e2e: Wait for the loading overlay to disappear before clicking#22672
Merged
DDDDDanica merged 1 commit intodevelopfrom Jan 26, 2024
Merged
e2e: Wait for the loading overlay to disappear before clicking#22672DDDDDanica merged 1 commit intodevelopfrom
DDDDDanica merged 1 commit intodevelopfrom
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
chloeYue
approved these changes
Jan 26, 2024
DDDDDanica
approved these changes
Jan 26, 2024
danjm
approved these changes
Jan 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
We've been having a lot of issues recently with flaky tests where the error is something like
ElementClickInterceptedError: Element <div class="mm-box multichain-app-header-logo mm-box--margin-2 mm-box--display-none mm-box--sm:display-flex mm-box--justify-content-center mm-box--align-items-center"> is not clickable at point (576,45) because another element <div class="mm-box loading-overlay"> obscures itWe have been fixing these flaky tests one at a time, but I realized that there's a more general solution.
Every time you try to click on an element, catch an
ElementClickInterceptedError, wait for.loading-overlayto disappear, and try again!Related issues
Manual testing steps
Yes, this is kind of hard to test, because you're looking for the lack of a certain type of flakiness. But I came up with the following test procedure:
const startTime = performance.now();isLoadingShownexpression withlet isLoadingShown = performance.now() - startTime < 8000;Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist