You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds component view tests covering two previously untested network-related regressions (#25100, #24972)
What changed
AssetDetails CVT (#25100) — A production regression was found in 7.61.6, where the token details page was pulling the network name from the globally selected network instead of the token's own chainId from route params. The existing unit tests never set up a cross-chain mismatch (e.g., viewing a Polygon token while Mainnet is selected), so this was not tested. The new CVT renders a Polygon WETH token against a Mainnet-selected state and asserts that "Polygon" appears in both the header and body, while "Ethereum Main Network" doesn't appear at all.
WalletActions CVT (#24972) — Was a regression caught during RC testing for 7.62.0, where the Perps button was gated behind isEvmSelected, so it disappeared when the user had a non-EVM network (Solana, Bitcoin, etc.) selected. The existing unit tests mock selectIsEvmNetworkSelected directly and never exercise the false case for Perps. The new CVT sets up real state with isEvmSelected: false and a Solana chain ID, then asserts the Perps button is still in the tree.
Both tests were red-green validated: they pass on the current codebase and fail when the respective fixes are reverted.
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Feature: my feature nameScenario: user [verb for user action]Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
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 format if applicable
I've applied the right labels on the PR (see labeling guidelines). 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.
Note
Low Risk
Test-only additions plus new test fixtures/render helpers; no production logic changes, with minimal risk beyond potential test flakiness from fixture assumptions.
Overview
Adds component-view regression tests for two network-selection issues: AssetDetails now has coverage ensuring the displayed network name is derived from the token chainId in route params (e.g., Polygon token while Mainnet is selected), and WalletActions has coverage ensuring the Perps button remains visible when a non-EVM network is selected.
Introduces reusable component-view test helpers: new state presets (initialStateAssetDetails, initialStateWalletActions) and renderers (renderAssetDetailsView, renderWalletActionsView) that build minimal fixtures (including Polygon network config, deterministic fiat rate overrides, and feature-flag enablement for Perps) to make these scenarios easy to reproduce in tests.
Written by Cursor Bugbot for commit 30d9e1e. This will update automatically on new commits. Configure here.
cortisiko
added
the
no-changelog
no-changelog Indicates no external facing user changes, therefore no changelog documentation needed
label
Feb 14, 2026
presets/assetDetails.ts - New test state fixture for AssetDetails unit tests
presets/walletActions.ts - New test state fixture for WalletActions unit tests
renderers/assetDetails.ts - New test renderer utility for AssetDetails unit tests
renderers/walletActions.ts - New test renderer utility for WalletActions unit tests
These changes:
Are entirely self-contained within the app/util/test/component-view/ directory (unit test infrastructure)
Do not modify any production application code
Do not affect E2E test infrastructure (Detox tests)
Do not change any shared components that E2E tests depend on
Only add new unit tests and their supporting utilities
The new test utilities are only imported by the new unit test files themselves, with no impact on the broader codebase. No E2E tests are needed to validate these changes as they are purely additive unit test infrastructure.
Performance Test Selection:
These changes are purely unit test infrastructure additions (Jest tests, test fixtures, and test renderers). They do not modify any production code, UI components, data loading logic, or any code paths that would affect app performance. No performance tests are needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
no-changelogno-changelog Indicates no external facing user changes, therefore no changelog documentation neededsize-Mteam-qaQA team
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds component view tests covering two previously untested network-related regressions (#25100, #24972)
What changed
AssetDetails CVT (#25100) — A production regression was found in 7.61.6, where the token details page was pulling the network name from the globally selected network instead of the token's own chainId from route params. The existing unit tests never set up a cross-chain mismatch (e.g., viewing a Polygon token while Mainnet is selected), so this was not tested. The new CVT renders a Polygon WETH token against a Mainnet-selected state and asserts that "Polygon" appears in both the header and body, while "Ethereum Main Network" doesn't appear at all.
WalletActions CVT (#24972) — Was a regression caught during RC testing for 7.62.0, where the Perps button was gated behind isEvmSelected, so it disappeared when the user had a non-EVM network (Solana, Bitcoin, etc.) selected. The existing unit tests mock selectIsEvmNetworkSelected directly and never exercise the false case for Perps. The new CVT sets up real state with isEvmSelected: false and a Solana chain ID, then asserts the Perps button is still in the tree.
Both tests were red-green validated: they pass on the current codebase and fail when the respective fixes are reverted.
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Test-only additions plus new test fixtures/render helpers; no production logic changes, with minimal risk beyond potential test flakiness from fixture assumptions.
Overview
Adds component-view regression tests for two network-selection issues:
AssetDetailsnow has coverage ensuring the displayed network name is derived from the tokenchainIdin route params (e.g., Polygon token while Mainnet is selected), andWalletActionshas coverage ensuring the Perps button remains visible when a non-EVM network is selected.Introduces reusable component-view test helpers: new state presets (
initialStateAssetDetails,initialStateWalletActions) and renderers (renderAssetDetailsView,renderWalletActionsView) that build minimal fixtures (including Polygon network config, deterministic fiat rate overrides, and feature-flag enablement for Perps) to make these scenarios easy to reproduce in tests.Written by Cursor Bugbot for commit 30d9e1e. This will update automatically on new commits. Configure here.