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: Fix Domains landing page empty state test flake #10094

Conversation

jdamore-linode
Copy link
Contributor

Description πŸ“

This fixes a flaky test by changing a should('not.be.visible') assertion to should('not.exist'). This test passes most of the time because the should('not.be.visible') assertion passes during a brief moment when the drawer close animation occurs (i.e. the element is still present in the DOM, but not visible). However, every so often this assertion does not occur quickly enough and the element is no longer present in the DOM, and the assertion fails.

This was initially planned to be included in a larger PR containing more fixes, but that's taking longer than I had planned and there's no reason to hold this back in the meantime.

Changes πŸ”„

List any change relevant to the reviewer.

  • Fix Domains landing page empty state test flake

How to test πŸ§ͺ

We can rely on CI, but this test can also be run locally using this command. In its current state, the test seems to fail more often in CI than locally; I was only able to trigger a failure twice out of 100 runs.

yarn cy:run -s "cypress/e2e/core/domains/domains-empty-landing-page.spec.ts"

As an Author I have considered πŸ€”

Check all that apply

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@jdamore-linode jdamore-linode requested a review from a team as a code owner January 22, 2024 21:45
@jdamore-linode jdamore-linode requested review from mjac0bs and carrillo-erik and removed request for a team January 22, 2024 21:45
Copy link

github-actions bot commented Jan 22, 2024

Coverage Report: βœ…
Base Coverage: 79.95%
Current Coverage: 79.95%

Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a comment

Choose a reason for hiding this comment

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

Great find!

Copy link
Contributor

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Nice! Thank you!

I almost opened a PR making the same change, but changing not.be.visible to not.exist was going to be a complete guess from me. Thanks for explaining the difference

@bnussman-akamai bnussman-akamai added Approved Multiple approvals and ready to merge! and removed Ready for Review labels Jan 23, 2024
@jdamore-linode jdamore-linode merged commit 9131416 into linode:develop Jan 23, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants