-
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 for Request Queuing for Multiple Dapps and Txs on different networks. should switch to the dapps network automatically when handling sendTransaction calls
#24809
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. |
Builds ready [5a4b70e]
Page Load Metrics (797 ± 532 ms)
Bundle size diffs
|
// Second Switch Network | ||
await driver.switchToWindowWithTitle( | ||
WINDOW_TITLES.ExtensionInFullScreenView, | ||
); |
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.
- we don't reload the browser anymore, and instead go to the activity tab explicitly
- we already switched to the Extension window (see line146 above), so we can remove this step
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! Thanks!
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. |
Description
This PR fixes the flaky test
Request Queuing for Multiple Dapps and Txs on different networks. should switch to the dapps network automatically when handling sendTransaction calls
.The test fails at the point of trying to find the unapproved transaction, in the transaction list. The problem is that in the test, we are doing a browser refresh in order for the transaction to show up, but there is a race condition that, if you do a refresh once the unapproved tx is already present, you are redirected to the confirmation screen. This causes that the transaction cannot be found in the activity list and the test fails.
The solution is to change the approach for a more robust one, and instead of doing a browser refresh, we simply go explicitly to the activity tab and wait until the transaction appears.
Circle ci Screenshot: it's looking for the unapproved-transaction but it cannot find it because after reloading MetaMask, the screen is redirected to the unapproved transaction.
Related issues
Fixes: #24603
Manual testing steps
yarn test:e2e:single test/e2e/tests/request-queuing/multiple-networks-dapps-txs.spec.js --browser=firefox --leave-running --retryUntilFailure --retries=10ng/multiple-networks-dapps-txs
Screenshots/Recordings
Behavior when you reload the browser with the unapproved transaction already present --> see how you are redirected to the confirmation page
reload-unapproved.mp4
Solution: no browser refresh but instead, going to the activity tab and wait until tx appears (see last seconds on the video)
unappproved-tx-list-fix.mp4
Pre-merge author checklist
Pre-merge reviewer checklist