Swaps 4038 trending e2e#27116
Conversation
…okens # Conflicts: # app/components/UI/Bridge/Views/BridgeView/__snapshots__/BridgeView.test.tsx.snap # app/components/UI/Bridge/Views/BridgeView/index.tsx
|
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. |
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.
| expect(getByTestId(BridgeViewSelectorsIDs.SOURCE_TOKEN_AREA)).toBeTruthy(); | ||
| expect( | ||
| getByTestId(BridgeViewSelectorsIDs.DESTINATION_TOKEN_AREA), | ||
| ).toBeTruthy(); |
There was a problem hiding this comment.
New test assertions use toBeTruthy() instead of toBeOnTheScreen()
Low Severity
Multiple newly added test assertions use toBeTruthy() to verify element presence (e.g., expect(getByTestId(...)).toBeTruthy()) instead of toBeOnTheScreen(). This violates the unit testing guidelines rule: "ALWAYS use toBeOnTheScreen() to assert element presence — NOT toBeTruthy() or toBeDefined()." Affected new assertions appear at lines 363, 366, 848, 887, 890, 924, 962, 964, and 1019.
Additional Locations (2)
Triggered by project rule: Unit Testing Guidelines


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
Medium Risk
Moderate UI-behavior change in
BridgeViewthat alters what content renders across loading/error/zero/quote states and adds scroll-driven pagination for trending tokens; could affect bridge screen layout and user flows but does not touch auth or transaction signing logic.Overview
Refactors
BridgeViewto render the token input areas inside the mainScrollViewand introduces an explicit content-mode switch (loading, error, quote, zero) to control what appears in the dynamic section.In loading (no active quote), the view now shows a
QuoteDetailsCardSkeleton(and hides the prior “Fetching quote” text); in zero state, it conditionally rendersBridgeTrendingTokensSectionbehind the temporaryswapsTrendingTokensremote feature flag, with near-bottom scroll detection to auto-load additional token rows.Tests were updated to match the new modes and selectors: snapshot assertions were removed, new
BridgeViewSelectorsIDswere added for trending filters/show-more and the quote skeleton, and BridgeView/view tests now validate loading/error/quote/zero rendering and explicitly trigger keypad open/close via input interactions.Written by Cursor Bugbot for commit 7e90d12. This will update automatically on new commits. Configure here.