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

fix: percy - wait to take snapshot until previous tooltips are gone #25522

Merged
merged 4 commits into from
Jan 23, 2023

Conversation

astone123
Copy link
Contributor

@astone123 astone123 commented Jan 19, 2023

User facing changelog

n/a

Additional details

In ConfigCode.cy.tsx, we're taking a snapshot with Percy that flakes sometimes because the snapshot sometimes happens before the previous hovered tooltip has faded of screen. I added an assertion to wait until there's only one tooltip on screen before taking the snapshot. This should make the snapshot more stable.

Steps to test

Check out the Percy snapshot result from CI. We should see it fail on this branch, but once it's built in develop, it shouldn't flake anymore. I noticed this on the build on Mike's PR where it flaked.

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?

@astone123 astone123 self-assigned this Jan 19, 2023
…-io/cypress into astone123/fix-config-percy-flake# Please enter a commit message to explain why this merge is necessary,
cy.percySnapshot()
cy.get('.v-popper__popper--shown').should('have.length', 1).then(() => {
// Take a snapshot after the other tooltips have closed
cy.percySnapshot()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could add this inside the each after the realHover

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to take a snapshot for each tooltip, just one. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah snap I meant to comment on the cy.get('.v-popper__popper--shown').should('have.length', 1), if you bumped that up it would enforce each interaction to deal with only one tooltip, then you wouldn't have to add it below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah right, good call

@cypress
Copy link

cypress bot commented Jan 19, 2023



Test summary

202 0 23 0Flakiness 1


Run details

Project cypress
Status Passed
Commit f9766a9
Started Jan 19, 2023 10:25 PM
Ended Jan 19, 2023 10:35 PM
Duration 09:16 💡
OS Linux Debian -
Browser Chrome 106

View run in Cypress Dashboard ➡️


Flakiness

cypress/e2e/migration.cy.ts Flakiness
1 global mode > migrates 2 projects in global mode

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

Copy link
Contributor

@marktnoonan marktnoonan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@astone123 astone123 merged commit 90187ea into develop Jan 23, 2023
@astone123 astone123 deleted the astone123/fix-config-percy-flake branch January 23, 2023 14:35
tgriesser added a commit that referenced this pull request Jan 26, 2023
* develop: (27 commits)
  refactor: remove unused cloud routes (#25584)
  chore: fix issue template formatting issue (#25587)
  fix: fixed issue with CT + electron + run mode not exiting properly (#25585)
  chore(deps): update dependency ua-parser-js to v0.7.33 [security] (#25561)
  fix: add alternative binary names for edge-beta (#25456)
  chore: add batch execution to CloudDataSource (#22457)
  chore: End a/b campaigns for aci smart banners (#25504)
  chore: release @cypress/schematic-v2.5.0
  fix(cypress-schematic): do not disable e2e support file (#25400)
  chore: adding memory issue template (#25559)
  feat: Add Angular CT Schematic (#24374)
  chore: enforce changelog entries on PR reviews (#25459)
  chore: bump package.json to 12.4.0 [run ci] (#25556)
  feat: Add 'type' option to `.as` to store aliases by value (#25251)
  chore: release @cypress/webpack-dev-server-v3.2.3
  feat: Display line break in cy.log (#25467)
  chore: update types (#25538)
  fix: Revert "fix: adding emergency garbage collection for chromium-based browsers" (#25546)
  fix: percy - wait to take snapshot until previous tooltips are gone (#25522)
  feat: support data-qa selector in selector playground (#25475)
  ...
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.

None yet

3 participants