Skip to content

Conversation

@davibroc
Copy link
Contributor

@davibroc davibroc commented Dec 1, 2025

Description

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Overhauls E2E tests and helpers to run with BIP44 stage 2 and multichain accounts, updating selectors, mocks, balances, and flows across pages and specs.

  • E2E Infrastructure & Flags:
    • Enable BIP44 stage 2 by default in helpers; add BIP44_STAGE_TWO feature flag and wire into mocks/manifests.
    • Normalize local node/network setup; add WebSocket server usage and tests.
  • Mocks & Fixtures:
    • Centralize price API mocks; replace spot-price usages; adjust token/bridge mocks.
    • Add/adjust BTC/Solana/DeFi/feature flag mocks; force forceBip44Version per test where needed.
  • Page Objects:
    • Update selectors and flows for multichain UI (account list, header, send, assets, dialogs).
    • Add methods for multichain wallet/account actions, syncing waits, balances, and address lists.
  • Spec Updates:
    • Refactor tests to multichain accounts (add/import/rename/remove), updated balances (ETH/USD), and activity selectors (transaction-status-label--confirmed).
    • Update connection/session, permissions, metrics, bridge, swap, send, tokens/NFT, hardware wallets, and identity syncing specs to new flows.
    • Skip/adjust flaky or incompatible Solana tests; fix network expectations and counts.
  • Misc:
    • Introduce utilities for hardware wallet address assertions; tweak login/balance checks; stabilize with minor delays.

Written by Cursor Bugbot for commit ab454df. This will update automatically on new commits. Configure here.

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

This PR turns BIP44 by default and make changes to the fixtures so that
Solana account is already created when the Extension starts

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/37365?quickstart=1)

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

Fixes:

1. Go to this page...
2.
3.

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Enables BIP-44 state 2 by default across e2e, adds multichain/Solana
defaults to fixtures, and updates page objects and tests to the new
multichain flows and feature-flag mocks.
>
> - **E2E Framework**:
> - Default `withFixtures` now enables BIP-44 stage 2 via feature flag
(boolean `forceBip44Version`, true by default) and applies only state-2
mocks when enabled.
> - Updated selectors and flows in benchmarks (use
`HeaderNavbar`/`AccountListPage`; activity selector for confirmed tx).
> - **Fixtures & Mocks**:
> - `default-fixture` seeds `AccountTreeController` with a multichain
wallet (Ethereum + Solana account) and updates `AccountsController`
metadata; enables Solana in network enablement.
> - Introduces `BIP44_STAGE_TWO` and injects it into feature-flag
responses; various bridge fixtures/mocks include it.
> - **Page Objects**:
> - `AccountListPage.checkPageIsLoaded` simplified to multichain UI
(always expects "Create account" and options menu; removes state arg);
ensures "Syncing" not shown.
>   - `HeaderNavbar` adds `clickNetworkAddresses`.
> - **Bridge Tests**:
> - Adjusted expectations to ETH balances/units; explicitly disable
BIP-44 where needed; minor skips added; hardforks normalized; duplicate
mocks removed.
> - **Multichain Accounts Tests**:
> - Updated to new `checkPageIsLoaded()` signature and multichain flows;
remove per-test state flags; minor assertions streamlined.
> - Unskips and simplifies wallet details scenario (validate presence in
account list).
> - **Solana Test Utilities**:
> - Add native price mock; tweak enabled networks and initial navigation
(network filter steps); remove per-account creation loop.
> - **Misc**:
> - Numerous tests now pass `forceBip44Version: false` where legacy
behavior is required; balance constants adjusted.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f8bb587. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/37406?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Hardcodes local-node balance to 24.998 in homepage tests and enables
the sendRedesign feature flag in multichain accounts mocks.
> 
> - **E2E Tests**:
> - **Homepage balance check**
(`test/e2e/page-objects/pages/home/homepage.ts`):
> - For local nodes, replace dynamic balance fetch with fixed `"24.998"`
in `checkLocalNodeBalanceIsDisplayed`.
> - **Feature flags**
(`test/e2e/tests/multichain-accounts/feature-flag-mocks.ts`):
>     - Set `sendRedesign.enabled` to `true` in `BIP44_STAGE_TWO`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
aea2615. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38154?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Stabilizes and refactors multichain and snap account E2E tests by
standardizing login flows, simplifying setup, adjusting
delays/mocks/fixtures, and reworking the hardware wallet test to use
direct fixtures with local balance setup.
> 
> - **E2E: Snap account transfers
(`test/e2e/tests/account/snap-account-transfers.spec.ts`)**
> - Standardize on `loginWithBalanceValidation`; remove
`loginWithoutBalanceValidation` usage.
> - Adjust timing: add pre-send delay for sync flow; keep post-send
delay for async approve.
> - Update fixtures (enable networks/prefs) and mocks wiring; add
`ignoredConsoleErrors` for reject case.
> - Update balance assertions; comment out flaky post-tx balance check
in async approve.
> - **E2E helper refactor
(`test/e2e/tests/multichain-accounts/common.ts`)**
> - Remove `NetworkManager` navigation; open account menu directly after
login.
> - Split fixtures by `AccountType` (Ledger vs MultiSRP) with
prefs/network enabled; tweak mock aggregation.
> - Use `loginWithoutBalanceValidation` only for hardware wallets;
others use `loginWithBalanceValidation`.
> - **E2E: Multichain account list menu
(`test/e2e/tests/multichain-accounts/multichain-account-list-menu.spec.ts`)**
> - Rework hardware wallet test to use `withFixtures`, set local node
balance, and log in with balance validation; add necessary
mocks/imports.
> - Minor cleanup and consistency updates across tests
(headers/navigation, balances).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d506922. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38207?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Replace modified vault fixtures and update E2E tests (snaps labels,
network counts, metrics), refactor websocket tests, and revise
state-logs schema and spec.
> 
> - **Fixtures**:
> - Replace encrypted `vault` payloads in `test/e2e/default-fixture.js`
and `fixture-builder.js` (`withKeyringControllerAdditionalAccountVault`,
`withKeyringControllerMultiSRP`, default vault).
> - **Snaps E2E**:
> - Update entropy source labels from long IDs to `SRP 1 (primary)` /
`SRP 2` in `test-snap-bip-32.spec.ts`, `test-snap-bip-44.spec.ts`, and
`test-snap-get-entropy.spec.ts`.
> - **Connections/Permissions E2E**:
> - Adjust expected connected networks count from `12` to `11` in
`edit-networks-permissions.spec.ts` and
`multiple-provider-connections.spec.ts`.
> - **Metrics E2E**:
> - Update `DappViewed` assertions for `number_of_accounts` from `3` to
`1` in `dapp-viewed.spec.ts`.
> - **WebSocket E2E**:
>   - Remove `tests/multichain-accounts/web-socket-connection.spec.ts`.
> - Refactor `tests/multichain/web-socket-connection.spec.ts` to use
`waitForWebsocketConnections` helper and eliminate fixed delays.
> - **State Logs**:
> - Expand `state-logs.json` schema (e.g., `accountsAssets`,
`assetsMetadata`, `balances`, `nonEvmTransactions`) and adjust internal
account structures.
> - Update `state-logs.spec.ts` to normalize dynamic account IDs before
type-map comparison.
> - **Misc**:
>   - Remove a debug `console.log` in hardware wallets helper.
>   - Fix minor comment typo in snap account transfers test.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a413e55. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

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.

@metamaskbot metamaskbot added the team-qa QA team label Dec 1, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🧪 @MetaMask/qa (12 files, +193 -155)
  • 📁 test/
    • 📁 e2e/
      • 📁 page-objects/
        • 📁 flows/
          • 📄 snap-permission.flow.ts +8 -2
        • 📁 pages/
          • 📁 dialog/
            • 📄 edit-connected-accounts-modal.ts +18 -18
          • 📁 home/
            • 📄 activity-list.ts +13 -0
            • 📄 asset-list.ts +34 -26
            • 📄 bitcoin-homepage.ts +5 -5
            • 📄 homepage.ts +11 -1
            • 📄 non-evm-homepage.ts +9 -7
          • 📁 multichain/
            • 📄 address-list-modal.ts +11 -0
            • 📄 multichain-account-details-page.ts +9 -2
            • 📄 account-list-page.ts +56 -72
            • 📄 header-navbar.ts +13 -6
        • 📄 helpers.js +6 -16

👨‍🔧 @MetaMask/wallet-integrations (6 files, +9 -14)
  • 📁 test/
    • 📁 e2e/
      • 📁 flask/
        • 📁 multichain-api/
          • 📁 evm/
            • 📄 wallet_createSession.spec.ts +4 -4
            • 📄 wallet_revokeSession.spec.ts +2 -2
            • 📄 wallet_sessionChanged.spec.ts +1 -1
          • 📁 non-evm/
            • 📄 wallet_createSession.spec.ts +1 -4
            • 📄 wallet_invokeMethod.spec.ts +0 -2
            • 📄 testHelpers.ts +1 -1

@metamaskbot
Copy link
Collaborator

Builds ready [ab454df]
UI Startup Metrics (1305 ± 103 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup13051075178010313611448
load107188313808211081244
domContentLoaded106487813758111031232
domInteractive22164162339
firstPaint54596126340910621153
backgroundConnect22620128815232258
firstReactRender4831109145481
getState3817160194271
initialActions105112
loadScripts8466761149818831012
setupStore1484161528
numNetworkReqs86306629
BrowserifyPower User HomeuiStartup18951602317625519152440
load1056907180912711251265
domContentLoaded1042899179412611011259
domInteractive33172373426104
firstPaint641108181943010141279
backgroundConnect25119960484240513
firstReactRender45378584569
getState19313674081199269
initialActions105112
loadScripts83268915521248711057
setupStore17106191635
numNetworkReqs81592545167240
WebpackStandard HomeuiStartup821708100553852911
load64056081861683763
domContentLoaded63555281061676759
domInteractive21164172239
firstPaint22285703156200684
backgroundConnect1254991532
firstReactRender55341943259128
getState241354103044
initialActions106112
loadScripts63255080761672757
setupStore1062431217
numNetworkReqs86336629
WebpackPower User HomeuiStartup15471169279024516712038
load73560193697827919
domContentLoaded72859493097820911
domInteractive30171292625105
firstPaint301106917213299772
backgroundConnect888592142109547
firstReactRender49417865159
getState18914365859200255
initialActions102011
loadScripts72559292795815903
setupStore1574271436
numNetworkReqs81582535267243
FirefoxBrowserifyStandard HomeuiStartup12621074188813213331483
load103992216559610761190
domContentLoaded103992216559610721190
domInteractive5532189278196
firstPaint------
backgroundConnect43201743247132
firstReactRender35296063650
getState126212211019
initialActions103012
loadScripts101390415298610371164
setupStore1064651014
numNetworkReqs86265722
BrowserifyPower User HomeuiStartup26301648403660630443805
load1586938318954220582361
domContentLoaded1586938318954220582360
domInteractive14232187627491972
firstPaint------
backgroundConnect150261066157200327
firstReactRender5735108176095
getState1417837850163225
initialActions207123
loadScripts1519922316551519612249
setupStore564109115544218
numNetworkReqs88522424982234
WebpackStandard HomeuiStartup15021261201713715781782
load1214107715848312651356
domContentLoaded1214107715848312641356
domInteractive57222263479131
firstPaint------
backgroundConnect3916133204387
firstReactRender42348474453
getState147136151433
initialActions103122
loadScripts1192106215618212391336
setupStore175195291253
numNetworkReqs86286725
WebpackPower User HomeuiStartup28101779369849931423424
load17891103262949822492593
domContentLoaded17891103262949822492593
domInteractive11928137022871955
firstPaint------
backgroundConnect1832112252641761093
firstReactRender58371241761102
getState1386732857174254
initialActions216122
loadScripts16821072260446121282378
setupStore3943597033250
numNetworkReqs93552535786240
📊 Page Load Benchmark Results

Current Commit: ab454df | Date: 12/1/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 998ms (±39ms) 🟢 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 689ms (±37ms) 🟢 | historical mean value: 726ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 998ms 39ms 974ms 1.29s 1.04s 1.29s
domContentLoaded 689ms 37ms 671ms 968ms 711ms 968ms
firstPaint 76ms 10ms 64ms 160ms 84ms 160ms
firstContentfulPaint 76ms 10ms 64ms 160ms 84ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 290 Bytes (0%)
  • common: 20 Bytes (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants