Skip to content
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

Merged
merged 5 commits into from
Mar 4, 2022

Conversation

ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented Mar 3, 2022

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

  • Have tests been added/updated?
  • [na] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?
  • [na] Have new configuration options been added to the cypress.schema.json?

…res images for uniqueness that represent the same state
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 3, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Mar 3, 2022



Test summary

19278 0 218 0Flakiness 1


Run details

Project cypress
Status Passed
Commit 70fe7b4
Started Mar 3, 2022 10:43 PM
Ended Mar 3, 2022 10:55 PM
Duration 11:25 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/cypress/proxy-logging_spec.ts Flakiness
1 Proxy Logging > request logging > xhr log has response body/status code

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

@ryanthemanuel ryanthemanuel marked this pull request as ready for review March 3, 2022 22:45
@ryanthemanuel ryanthemanuel requested a review from a team as a code owner March 3, 2022 22:45
@ryanthemanuel ryanthemanuel requested review from jennifer-shehane and removed request for a team and jennifer-shehane March 3, 2022 22:45
@@ -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
Copy link
Collaborator Author

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.

@ryanthemanuel ryanthemanuel self-assigned this Mar 4, 2022
@ryanthemanuel ryanthemanuel merged commit 2e62bbb into develop Mar 4, 2022
@ryanthemanuel ryanthemanuel deleted the ryanm/chore/fix-system-screenshot-flake branch March 4, 2022 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants