fix: flaky test Snap Multi Install test multi install snap#40740
Closed
Unik0rnMaggie wants to merge 2 commits intomainfrom
Closed
fix: flaky test Snap Multi Install test multi install snap#40740Unik0rnMaggie wants to merge 2 commits intomainfrom
Unik0rnMaggie wants to merge 2 commits intomainfrom
Conversation
…in multi-install snap test The test was failing with TimeoutError waiting for the 'Add to MetaMask' h3 element. This is the same root cause fixed in dd2eb8f for other snap tests via the SnapInstall page object. The race condition: without waiting for the 'Connection request' header, the test could click a disabled 'Connect' button (shown during the snap install loading state), causing the dialog to never advance to the 'Add to MetaMask' screen. Fix mirrors the pattern applied in snap-install.ts page object: wait for 'Connection request' h3 before clicking Connect. Co-authored-by: Unik0rnMaggie <Unik0rnMaggie@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
Contributor
✨ Files requiring CODEOWNER review ✨🫰 @MetaMask/core-platform (1 files, +14 -5)
|
…snap test The CI logs show the 'Connect' click was on the correct Connection Request button, but the subsequent waitForSelector for h3 'Add to MetaMask' timed out after 10131ms (the default 10s threshold). The snap binary download (bip32-example-snap-2.3.0.tgz) + multiple acl.execution.metamask.io registry/signature verification calls take slightly over 10 seconds in CI, causing the default timeout to expire before the install dialog renders. Increase the timeout to 30s for this specific selector which requires snap binary download and ACL registry verification to complete. Co-authored-by: Unik0rnMaggie <Unik0rnMaggie@users.noreply.github.com>
|
Contributor
Builds ready [f9fa803]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
seaona
reviewed
Mar 10, 2026
| tag: 'h3', | ||
| text: 'Add to MetaMask', | ||
| }, | ||
| { timeout: 30000 }, |
Member
seaona
reviewed
Mar 10, 2026
| text: 'Connection request', | ||
| tag: 'h3', | ||
| }); | ||
|
|
Member
There was a problem hiding this comment.
this might fix the issue. We wait until the page is fully loaded before proceeding. However, it would be better if the whole test is migrated to page objects and then we can use page object methods instead of hardcoding a fix here
Contributor
Author
There was a problem hiding this comment.
Thank you very much! Closing this PR and added a new one to migrate the whole test
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.




Fixes flaky
Test Snap Multi Installby waiting for the "Connection request" header before clicking "Connect".The test was encountering a
TimeoutErrorbecause it could click a disabled "Connect" button during the snap's loading state, preventing the "Add to MetaMask" dialog from appearing. This fix ensures the dialog is in the expected "Connection request" state before proceeding, mirroring a previous fix for similar snap install tests.Slack Thread