-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: update screenshot system-tests flake so that it no longer compares images for uniqueness that represent the same state #20463
test: update screenshot system-tests flake so that it no longer compares images for uniqueness that represent the same state #20463
Conversation
…res images for uniqueness that represent the same state
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@@ -11,6 +11,8 @@ const testFail = (cb, expectedDocsUrl = 'https://on.cypress.io/intercept') => { | |||
}) | |||
} | |||
|
|||
// Due to an issue with requests leaking between tests, we need to ensure that routes are unique from test to test |
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 forgot to add this comment on a previous PR so I thought I'd go ahead and get it on this one.
User facing changelog
n/a
Additional details
This fixes a flake with screenshot system tests. Specifically, we are checking that image sizes are unique that are taken during the test (if the size is different, the image is likely different). Two images specifically will sporadically be identical images and this causes a flake. The two images in question are created by simulating an exception in both the beforeEach and afterEach hooks. Both exceptions will create an image and both will display the same state of the reporter since the images capture the state at the time of the exception and not when the exception itself is displayed. Before 10.0 we were still saved by the running timer for the overall test since it would keep track of the times out to the 100th of a second. In 10.0 that was switched to be to the nearest second so this happens much more frequently.
The fix for this is to ignore one of the potentially duplicated images when doing the uniqueness check.
How has the user experience changed?
n/a
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?