test: remove withSolanaAccountSnap as we have default Multichain support in all our e2e#40327
test: remove withSolanaAccountSnap as we have default Multichain support in all our e2e#40327
withSolanaAccountSnap as we have default Multichain support in all our e2e#40327Conversation
✨ Files requiring CODEOWNER review ✨🫰 @MetaMask/core-platform (1 files, +11 -4)
🧪 @MetaMask/qa (2 files, +40 -1)
👨🔧 @MetaMask/wallet-integrations (2 files, +38 -23)
|
Builds ready [c4700df]
⚡ Performance Benchmarks (1353 ± 98 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [f67bab3]
⚡ Performance Benchmarks (1394 ± 109 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
withSolanaAccountSnap as we have default Multichain support in all our e2e
Builds ready [c7d5849]
⚡ Performance Benchmarks (1390 ± 92 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| }: { | ||
| mockServer: Mockttp; | ||
| balance?: number; | ||
| }) { |
There was a problem hiding this comment.
ℹ️ instead of having mockZeroBalance as bool, we now accept a balance param, which allows us to customize the balance to any value we want
|
|
||
| export const SHOW_SWAP_SNAP_CONFIRMATION = false; | ||
|
|
||
| const featureFlags = { |
There was a problem hiding this comment.
this can be removed as not used anywhere
| | MockedEndpoint; | ||
| }; | ||
|
|
||
| export async function withSolanaAccountSnap( |
There was a problem hiding this comment.
this was a giant abstraction of test setup+test actions.
This complexity is very much simplified now, by removing duplicated things (as we already have solana/multichain accounts by default), focusing now solely on mocks setup
| */ | ||
| export const DEFAULT_SOLANA_TEST_DAPP_FIXTURE_OPTIONS = { | ||
| dappOptions: { | ||
| customDappPaths: [DAPP_PATH.TEST_DAPP_SOLANA], |
There was a problem hiding this comment.
abstraction not needed, we can use the dappOptions like in any other spec
Builds ready [795209e]
⚡ Performance Benchmarks (1362 ± 84 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| async checkPageIsLoaded(): Promise<void> { | ||
| try { | ||
| await this.driver.waitForMultipleSelectors([ | ||
| this.sendButton, |
There was a problem hiding this comment.
I changed this selector because this checkPageIsLoaded (super) is also used in the non-evm-hompage, but in that page, the send button has a different id. So this could cause confusion -> now using a selector that is common in both
Builds ready [603053e]
⚡ Performance Benchmarks (1405 ± 99 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
|
Builds ready [891c68a]
⚡ Performance Benchmarks (1364 ± 115 ms)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|



Description
This PR removes the
withSolanaAccountSnapmethod, as we have default Multichain support in all our e2e, so we don't need the duplicated setup of feature flags etc (which is already set by default).All specs start the wallet with multichain accounts, meaning this method is now obsolete/missleading/duplicated.
Instead of
withSolanaAccountSnapwe can usewithFixturesout of the box.This simplifies test setup and makes the tests also easier to debug and maintain.
Additional changes:
Note: e2e quality gate is disabled due to the number of specs changed, causing the ci to timeout due to extra test runs.
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
This data is for the migration of V2 fixtures (before and after):
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Broad test-harness refactor touching many E2E specs and mocks; risk is primarily increased CI flakiness or missing setup (login/network/account) causing false failures rather than production impact.
Overview
Removes the bespoke Solana E2E harness
withSolanaAccountSnapin favor of usingwithFixturesdirectly across Solana/multichain specs, updating tests to explicitly log in, switch to Solana where needed, and passfixtures/dappOptions/testSpecificMockper scenario.Refactors Solana test mocking by introducing
buildSolanaTestSpecificMock(andSolanaMockOptions) plus a more flexiblemockSolanaBalanceQuotesignature, and updates affected swap/SPL/tx tests accordingly. Adds a reusableaddAccountflow for creating/switching multichain accounts, extendsFixtureBuilderV2withwithShowNativeTokenAsMainBalanceDisabled, and tweaksHomePage.checkPageIsLoadedto wait on the balance section rather than the send button.Written by Cursor Bugbot for commit 891c68a. This will update automatically on new commits. Configure here.