-
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
Cupress test for issue 1785 #2018
Cupress test for issue 1785 #2018
Conversation
Pull Request Test Coverage Report for Build 6960
💛 - Coveralls |
tests/cypress/integration/issue_1785_propagation_latest_frame.js
Outdated
Show resolved
Hide resolved
97102b4
to
67396a6
Compare
for (let img of images) { | ||
cy.imageGenerator(imagesFolder, img, width, height, color, posX, posY, labelName) | ||
} | ||
cy.wait(2000) |
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.
Why should we wait here?
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.
Sometimes I encountered a situation when only 2 images were archived. The third image apparently did not exist at this point. So I decided to add a little waiting.
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.
Probably it is because the function imageGenerator
works as async. Probably we can do this command returns a promise. Then cypress
will wait till this command is done
https://docs.cypress.io/api/commands/task.html#Return-a-Promise-from-an-asynchronous-task
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'll try to rework the function. Thanks.
tests/cypress/integration/issue_1785_propagation_latest_frame.js
Outdated
Show resolved
Hide resolved
tests/cypress/integration/issue_1785_propagation_latest_frame.js
Outdated
Show resolved
Hide resolved
tests/cypress/integration/issue_1785_propagation_latest_frame.js
Outdated
Show resolved
Hide resolved
tests/cypress/integration/issue_1785_propagation_latest_frame.js
Outdated
Show resolved
Hide resolved
67396a6
to
0c00638
Compare
tests/cypress/integration/issue_1785_propagation_latest_frame.js
Outdated
Show resolved
Hide resolved
Add test. Add functionality for create zip archive with images. Update package.json, package-lock.json.
Code refactoring.
0c00638
to
a982e8c
Compare
Remove wait() after image generation.
1b91a51
to
6ec6556
Compare
cy.get('.cvat-draw-shape-popover-content') | ||
.find('button') | ||
.contains('Shape') | ||
.click({force: true}) |
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.
What does the argument force: true
do?
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.
Forcing a click overrides the actionable checks Cypress applies and will automatically fire the events.
From Cypress log (without forcing):
Timed out retrying: cy.click() failed because this element:
<span>Shape</span>
has CSS pointer-events: none
pointer-events: none prevents user mouse interaction.
Fix this problem, or use {force: true} to disable error checking.
Add test.
Add functionality for create zip archive with images.
Update package.json, package-lock.json.
Motivation and context
Add Cypress test for issue 1785
How has this been tested?
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.