test: add smoke swap trending tokens e2e coverage#26910
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. |
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - base branch is not main (base: swaps-4038-trending-tokens) All E2E tests pre-selected. |
|
The committed fixture schema is out of date. To update, comment: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| }, | ||
| 1001, | ||
| ); | ||
| }; |
There was a problem hiding this comment.
High-priority feature flag mock silently shadows bridge-mocks setup
Medium Severity
setupSwapsTrendingTokensMock registers a regex-based feature flag mock at priority 1001, which intercepts all feature flag requests before the exact-URL mocks set up by testSpecificMock (from bridge-mocks.ts) at default priority. This means the bridgeConfigV2.chainRanking override from testSpecificMock is silently discarded — the response only contains default flags plus swapsTrendingTokens: true. The bridge UI depends on chainRanking for network pill ordering and availability. The test still passes because defaults include "Base", but the testSpecificMock feature flag setup is effectively dead code, and the test isn't running under the correct bridge configuration.





Description
Adds minimal SmokeTrade E2E coverage for Bridge Swap Trending Tokens zero-state behavior as a follow-up to the feature PR to keep implementation and test review separated.
Scope is intentionally narrow:
Changelog
CHANGELOG entry: null
Related issues
Fixes: Follow-up coverage for #26620 (SWAPS-4038)
Manual testing steps
Screenshots/Recordings
Before
N/A (test-only follow-up PR)
After
N/A (test-only follow-up PR)
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Test-only additions; primary risk is potential flakiness due to new Detox selectors, scrolling, and network mocking for trending tokens/feature flags.
Overview
Adds SmokeTrade E2E coverage for Swap Trending Tokens (Bridge zero-state), including a new
SwapTrendingTokensViewpage object for interacting with the trending section, filters, bottom sheets, and token rows.Introduces a new smoke spec that enables the
swapsTrendingTokensremote flag, mocks the/v3/tokens/trendingproxy responses (all networks vs Base-only), verifies filter behavior and default sort text, confirms tapping a row opens token details, and asserts the trending section hides once a swap amount is entered.Written by Cursor Bugbot for commit 7e90d12. This will update automatically on new commits. Configure here.