test: MM-1498 - Remove anti-patterns in solana-wallet-standard specs#40604
test: MM-1498 - Remove anti-patterns in solana-wallet-standard specs#40604LeVinhGithub wants to merge 14 commits intomainfrom
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. |
✨ Files requiring CODEOWNER review ✨🧪 @MetaMask/qa (2 files, +53 -12)
|
Builds ready [c56e63b]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [62da8ac]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [62da8ac]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [84de995]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [db60680]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
test/e2e/page-objects/pages/confirmations/snap-sign-message-confirmation.ts
Outdated
Show resolved
Hide resolved
Builds ready [a10576f]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [a10576f]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [210a0fc]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| const signMsgConfirmation = new SnapSignMessageConfirmation(driver); | ||
| const txConfirmation = new SnapTransactionConfirmation(driver); | ||
| await signMsgConfirmation.checkPageIsLoaded(); | ||
| await txConfirmation.checkNetworkIsDisplayed('Solana Mainnet'); |
There was a problem hiding this comment.
Wrong page object used for sign message network check
Low Severity
A SnapTransactionConfirmation instance is created solely to call checkNetworkIsDisplayed on what is actually a sign message dialog (triggered by signMessage()). The page is loaded via SnapSignMessageConfirmation.checkPageIsLoaded() which checks for a "Sign message" header, but then a separate SnapTransactionConfirmation is used for the network assertion. The PR description states checkNetworkIsDisplayed was added to both SnapSignMessageConfirmation and SnapTransactionConfirmation, but it only exists on SnapTransactionConfirmation.
Triggered by project rule: MetaMask Extension E2E Testing Guidelines
|
Builds ready [18477bf]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|





Description
The Solana Wallet Standard E2E specs had several anti-patterns that made tests flaky and harder to maintain:
driver.delay()– Arbitrary waits instead of dynamic waitsclickConfirmButton,clickCancelButton) – Brittle CSS selectors and direct driver accessChanges:
driver.delay()with dynamic waits (page objects usewaitForSelector,checkPageIsLoaded, etc.)clickConfirmButtonandclickCancelButtonfromtestHelpers.tsand replaced them withSnapSignMessageConfirmation,SnapSignTransactionConfirmation, andSnapTransactionConfirmationpage objectscheckNetworkIsDisplayed(networkName)toSnapSignMessageConfirmationandSnapTransactionConfirmationfor network assertionsBy.xpath,driver.clickElement) with page object methodsChangelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1498
Manual testing steps
yarn build:testyarn test:e2e:single "test/e2e/flask/solana-wallet-standard/**/*.spec.ts" --browser=chromeScreenshots/Recordings
N/A — code refactor only.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk because changes are confined to E2E test code and page objects; main behavior change is replacing fixed delays/fragile selectors with explicit waits, which could still affect timing assumptions but won’t impact production logic.
Overview
Refactors Solana Wallet Standard E2E specs to reduce flakiness by removing
driver.delay()calls and direct Selenium selector usage, switching assertions/actions to the existing Page Object Model.Replaces the local
clickConfirmButton/clickCancelButtonhelpers withSnapSignMessageConfirmationandSnapTransactionConfirmationinteractions that wait for dialogs to close, and addscheckNetworkIsDisplayed()plus cancel/confirm “and wait for window to close” helpers toSnapTransactionConfirmationfor network assertions and safer dialog handling.Written by Cursor Bugbot for commit 18477bf. This will update automatically on new commits. Configure here.