Repository navigation
test(e2e): add bitcoin assets network filter cases - #47587
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 [884ae15] [reused from e231b08]
⚡ Performance Benchmarks (Total: 🟢 3 pass · 🟡 1 warn · 🔴 1 fail)
Bundle Size Diffs
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the test-only Bitcoin network-filter coverage changes.
No open issues 🎉
What changed in this PR
Adds network-filter coverage to the Bitcoin assets E2E suite, following the existing Tron test pattern. Changes are test-only.
Changes:
- Adds an All networks case that verifies Bitcoin and Ethereum appear together.
- Adds a Bitcoin-only case that checks the exact asset list and confirms Ethereum is absent.
- Reuses existing fixtures, funded Bitcoin mocks, network flows, and page-object assertions.
| File | Description |
|---|---|
test/e2e/tests/btc/assets.spec.ts |
Adds two isolated network-filter tests and imports the existing selection flow and balance assertion timeout. |
Review effort: Balanced
|
No release label on PR. Adding release label release-13.57.0 on PR, as PR was added to branch 13.57.0 when release was cut. |
Description
Context
Bitcoin is a Snap-backed network in the extension: its account readiness, asset metadata, and balances flow through the Bitcoin Snap, the unified asset state, and the network-filter modal before anything renders in the homepage asset list.
This PR closes a coverage gap in the Bitcoin E2E assets suite by mirroring what the Tron assets suite already does in
test/e2e/tests/assets/tron.spec.ts.Problem
test/e2e/tests/btc/assets.spec.tsverified the asset list for an empty account and the asset list plus native BTC details for a funded account, but it never exercised the network filter. Nothing asserted that:A regression in network-scoped filtering of unified asset state would therefore reach users unnoticed, because the existing cases only ever ran with Bitcoin selected.
Solution
Add a
Networks filterdescribe block totest/e2e/tests/btc/assets.spec.tswith one isolated browser fixture per case:
All networks filter shows other chains alongside Bitcoin— logs in, switches to Bitcoin, waits for the Bitcoin row, selects All networks, then asserts bothBitcoinandEthereumare in the list.Current network filter shows only Bitcoin assets— logs in, switches to Bitcoin, then asserts the exact list is['Bitcoin']and thatEthereumis absent.Implementation notes for reviewers:
mockBtcAssetsFundedstatic mocks and the existingFixtureBuilderV2setup; onlyselectAllNetworksFromNetworkSelectandHOMEPAGE_BALANCE_ASSERTION_TIMEOUT_MSare newly imported. No new fixture wrapper, flow, page-object API, mock, or page-object selector was added.localNode: false.withFixturesdefaults to an Anvil node, so the default Ethereum account is funded and its row appears under All networks.check*methods only, no selectors or direct driver UI calls in the spec, no local UI helper, no hardcoded delay, and notry/catch.Changelog
CHANGELOG entry: null
Related issues
Fixes: expand send E2E coverage
Manual testing steps
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Test-only changes with no production code, security, or data-handling impact.
Overview
Adds network filter coverage to the Bitcoin assets E2E suite, aligned with the existing Tron assets pattern in
tron.spec.ts.A new
Networks filterblock intest/e2e/tests/btc/assets.spec.tsintroduces two cases on top of the existingmockBtcAssetsFundedsetup: one selects All networks and expects Bitcoin and Ethereum in the token list; the other keeps Bitcoin as the current network and asserts the list is Bitcoin-only with Ethereum absent. Both reuseselectAllNetworksFromNetworkSelect,HOMEPAGE_BALANCE_ASSERTION_TIMEOUT_MS, and existingTokensTabchecks—no new mocks, fixtures, or page-object APIs.Reviewed by Cursor Bugbot for commit 884ae15. Bugbot is set up for automated code reviews on this repo. Configure here.