test: fix flaky test Send ETH from inside MetaMask finds the transaction#24639
Merged
test: fix flaky test Send ETH from inside MetaMask finds the transaction#24639
Send ETH from inside MetaMask finds the transaction#24639Conversation
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. |
Collaborator
Builds ready [086ce3b]
Page Load Metrics (972 ± 533 ms)
Bundle size diffs
|
zone-live
approved these changes
May 21, 2024
chloeYue
reviewed
May 21, 2024
Collaborator
|
Missing release label release-11.16.6 on PR. Adding release label release-11.16.6 on PR and removing other release labels(release-11.18.0), as PR was cherry-picked in branch 11.16.6. |
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
The problem with this flaky test is that in some occurrences we are proceeding to the last Confirmation screen without the balance being loaded (race condition). This can be observed at second 4 from this video. This test fails every time this condition is met (very often in Mutlichain build, possibly due to shorter flow of UI?)
The fix is simply waiting for the balance to be loaded before proceeding with the actions.
However, I think we should also revise the application behaviour, as it does not seem correct that:
I'll open separate tickets for that
Example of failure: https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/81147/workflows/ec5f9950-23fa-4f6f-b248-9f894813e75d/jobs/2874889/tests
e2e-insufficient-balance.mp4
Related issues
Fixes: #24574
Manual testing steps
yarn test:e2e:single test/e2e/tests/transaction/send-eth.spec.js --browser=chrome --leave-running=true --retry-until-failure --retries=15Screenshots/Recordings
In the test failing artifacts we can see how we cannot proceed with the transaction as the Confirm button is disabled. However the problem is that the gas is set to 0 and never recovered, but the real root cause comes from proceeding with the previous screen without the balance loaded.
Pre-merge author checklist
Pre-merge reviewer checklist