-
Notifications
You must be signed in to change notification settings - Fork 5k
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: flaky test Navigate transactions should reject and remove all unapproved transactions
#25312
Conversation
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. |
LGTM ! A very legit fix indeed ! |
thank you @DDDDDanica ❤️ 🙇♀️ ℹ️ I've updated the PR to add the mitigation to the rest of the tests which have the same setup (preloaded transactions), to make sure it doesn't fail in the future in any other of the |
Builds ready [60e1300]
Page Load Metrics (121 ± 156 ms)
Bundle size diffs
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #25312 +/- ##
========================================
Coverage 65.67% 65.67%
========================================
Files 1376 1376
Lines 54546 54546
Branches 14298 14298
========================================
Hits 35819 35819
Misses 18727 18727 ☔ View full report in Codecov by Sentry. |
Builds ready [2e344e8]
Page Load Metrics (53 ± 4 ms)
Bundle size diffs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR fixes the flaky test
Navigate transactions should reject and remove all unapproved transactions
.It fails with the error
TimeoutError: Waiting for element to be located By(xpath, //button[contains(text(), "Reject all")])
.The problem is that we click the Reject button, before the confirmation screen has fully loaded (specifically, the total amount for that tx is not there yet). This causes the click to don't have any effect and the subsequent popup with the Reject All never appears.
The fix is simply await for the tx to be fully loaded (notice how the total amount box is not loaded at the moment of the failure below).
Furthermore, it's been observed that the unapproved tx where trying to load simulations (see loading spinner). This shouldn't prevent to continue, but to further stabilize the test, the transactions have now disabled the simulations.
Related issues
Fixes: #24661 and #24641
Manual testing steps
yarn test:e2e:single test/e2e/tests/transaction/navigate-transactions.spec.js --browser=chrome --leave-running --retryUntilFailure --retries=10
Screenshots/Recordings
Before
Notice how when the test failed, the total tx amount was yet not loaded (3.000,..) and we only see the gas displayed.
Furthermore: we see the tx simulation element loading (this is not the cause of this failure, but it has also disabled, to stabilize the screen).
After
Notice that the tx simulations loading element is not there.
Notice how the correct amount is await until proceeding (3.0000315)
Pre-merge author checklist
Pre-merge reviewer checklist