-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test for button on frame player that copies the current frame's filename #9081
base: develop
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #9081 +/- ##
========================================
Coverage 73.91% 73.92%
========================================
Files 428 428
Lines 44530 44530
Branches 3881 3881
========================================
+ Hits 32915 32917 +2
+ Misses 11615 11613 -2
|
return cy.get('.cvat-player-filename-wrapper').invoke('text'); | ||
} | ||
|
||
function clipboard() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to name this copyToClipboard
since it not only retrieves the clipboard contents but also triggers the action by pressing the button.
}); | ||
}); | ||
|
||
it('Check clipboard after deleting frame, after Undo', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure if we need tests that mix copying and deleting, as these are separate functionalities. Deleting a frame shouldn't affect copying. If treated separately, we are essentially repeating the same operations as in the previous two tests: copy → change frame → copy again. Even if there were a potential intersection, it would be considered a regression and should be covered by a dedicated regression test. Since we haven't encountered such a regression, I suggest we remove these test cases for now.
This checks that the frame filename displayed in the annotation view UI is copied to clipboard correctly
Regression test for #8989
How has this been tested?
Use the existing Main task to trigger UI events that change clipboard contents.
Prepartion
before the test suite
before each test case
Note: Unlike mocks, spies call the real function to gain information on how this function was called
Cases
Case 1: Check that frame filename can be copied to clipboard
Case 2: Check clipboard after switching frames
Case 3: Check clipboard after deleting frame and after Undo
Case 4: Check clipboard after deleting and restoring frame
Same as Case 3 but with frame visibility enabled in user settings. The assertion is that the filename and the clipboard shouldn't change after deletion and after restoration
Checklist
develop
branchLicense
Feel free to contact the maintainers if that's a concern.