test: update screenshot system-tests flake so that it no longer compares images for uniqueness that represent the same state #20463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
?