test: Fix Domains landing page empty state test flake #10094
Merged
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.
Description π
This fixes a flaky test by changing a
should('not.be.visible')
assertion toshould('not.exist')
. This test passes most of the time because theshould('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.
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