-
Notifications
You must be signed in to change notification settings - Fork 221
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
Cypress Flaky tests need to be updated #2900
Labels
Comments
alanbsmith
pushed a commit
that referenced
this issue
Nov 27, 2024
Fixes: #2900 This is adding fixes for the Cypress flaky specs that were caused from the [Webpack Upgrade](#2674). This is addressing Flaky results for Cypress. A test is considered to be flaky when it can pass and fail across multiple retry attempts without any code changes. For example, a test is executed and fails, then the test is executed again, without any change to the code, but this time it passes. See more about Flaky [here](https://docs.cypress.io/cloud/features/flaky-test-management). A Flaky result only happens in the CI and not in local since running Cypress locally only gives `pass` or `fail` results. We had recently switched from E2E tests (end-to-end) to Component tests when upgrading [Storybook](#2674) and this had created flaky results on some of our components. We think this may be due to the nature of the Component runner as it is so much quicker than E2E. Due to it's nature of being much quicker, it resulted in flaky results due to our components not being to move as quick as the component runner. There may be times where the Component runner would move quicker than an item being focused in a menu or an item switching focus from one item to the next. To address the Flaky issues, there have been updates made to some Component Specs: - Be more explicit with contexts (making sure that each line could be something that a user would do) - Rely on the use of `findByRole()` instead of using `get()`. This allows us to be more specific about what element it is grabbing - Removing deeply nested contexts and moving out to it's own context. This way we are not using more `beforeEach` than is needed and improves legibility. [category:Test]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🐛 Bug Report
There are flaky tests currently after the Webpack update. This is most likely due to how fast the component runner is and will need checks before running the set of tests so React can render the component updates.
Expected Behavior
There are currently flaky tests and ActionBar has failing tests. These will need to be removed.
Actual Results
The cause of the Flaky tests seem to be with how quickly the Component Runner moves through each test. This does not give React enough time to update each state of the components.
The text was updated successfully, but these errors were encountered: