test(homepage): add E2E smoke tests for homepage sections network filter#27477
test(homepage): add E2E smoke tests for homepage sections network filter#27477vinnyhoward wants to merge 8 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. |
…mcu-546-update-e2e-tests-for-network-switcher
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
|
||
| // Homepage tokens section shows ALL tokens regardless of the Linea-only filter | ||
| await NetworkManager.checkTokenIsVisible('ETH'); | ||
| await NetworkManager.checkTokenIsVisible('SOL'); |
There was a problem hiding this comment.
SOL token assertion fails—never seeded in fixture
High Severity
The test asserts NetworkManager.checkTokenIsVisible('SOL') on the homepage after navigating back, but no SOL token is ever seeded in the fixture. withTokensForAllPopularNetworks only seeds EVM chains (Ethereum, Polygon, BSC, etc.) — it does not include Solana. Combined with withNetworkEnabledMap({ eip155: { '0x1': true } }) restricting to Ethereum only, the homepage will show at most ETH and USDC. This assertion will always fail, making the test broken on every run.
Additional Locations (1)
| jest.setTimeout(170000); | ||
| }); | ||
|
|
||
| it('should navigate from homepage tokens section to tokens full view', async () => { |
There was a problem hiding this comment.
Test names use prohibited "should" prefix
Low Severity
All three test names start with 'should ...', which violates the E2E testing guidelines rule: "DON'T: Use the prefix 'should'." Test names need to use action-oriented descriptions (e.g., 'navigates from homepage tokens section to tokens full view' instead of 'should navigate ...').
Additional Locations (2)
Triggered by project rule: MetaMask Mobile E2E Testing Guidelines
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The spec directly uses No performance-impacting code changes are present — these are purely test infrastructure additions. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|





Description
The new homepage sections UI (
homepageSectionsV1) introduces a sectioned layout that replaces the old tabs view. Each section (Tokens, NFTs, DeFi, etc.) is tappable and navigates the user to a dedicated full-screen view. These full-screen views (e.g.TokensFullView) include a network filter (theNetworkManagerbottom sheet) that lets users filter assets by network.This PR adds E2E smoke tests to verify:
TokensFullViewworks correctly and the network filter button is present.TokensFullViewnetwork manager correctly filters the token list to that network.TokensFullViewis scoped to the full-screen view only — navigating back to the homepage shows all tokens regardless of the filter applied in the full-screen view.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-546
Manual testing steps
Screenshots/Recordings
~Before
~After
~Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk since changes are test-only (new Detox page object + smoke spec) and do not modify production logic; main risk is potential flakiness due to UI timing/fixture assumptions.
Overview
Adds new E2E smoke coverage for the
homepageSectionsV1tokens section, validating navigation from the homepage into the tokens full-screen view and presence of the network filter control.Introduces a small
TokensFullViewpage object and a new smoke spec that verifies network-based token filtering in the full view (e.g., Ethereum-only) and that any filter applied there does not affect the homepage token section after navigating back (using fixtures + mocked remote feature flag).Written by Cursor Bugbot for commit 93d6430. This will update automatically on new commits. Configure here.