Skip to content

test: add smoke swap trending tokens e2e coverage#26910

Merged
bfullam merged 1 commit into
swaps-4038-trending-tokensfrom
swaps-4038-trending-e2e
Mar 6, 2026
Merged

test: add smoke swap trending tokens e2e coverage#26910
bfullam merged 1 commit into
swaps-4038-trending-tokensfrom
swaps-4038-trending-e2e

Conversation

@bfullam
Copy link
Copy Markdown
Contributor

@bfullam bfullam commented Mar 3, 2026

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:

  • Verifies zero-state trending section visibility and filter interaction flow.
  • Verifies row navigation behavior from trending list.
  • Uses existing smoke framework/page-object patterns.

Changelog

CHANGELOG entry: null

Related issues

Fixes: Follow-up coverage for #26620 (SWAPS-4038)

Manual testing steps

Feature: Swap trending tokens smoke coverage

  Scenario: user validates bridge zero-state trending interactions
    Given the app is running with swap trending tokens enabled
    And the user is on the Swap screen in Bridge zero state

    When the user opens and applies trending filters
    Then the trending list reflects the selected filters

    When the user taps a trending token row
    Then the user is navigated to that token's asset details

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

  • 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; 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 SwapTrendingTokensView page object for interacting with the trending section, filters, bottom sheets, and token rows.

Introduces a new smoke spec that enables the swapsTrendingTokens remote flag, mocks the /v3/tokens/trending proxy 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 2026

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.

@metamaskbot metamaskbot added the team-swaps-and-bridge Swaps and Bridge team label Mar 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 2026

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - base branch is not main (base: swaps-4038-trending-tokens)

All E2E tests pre-selected.

View GitHub Actions results

@github-actions github-actions Bot added the size-M label Mar 3, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 3, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 2026

⚠️ E2E Fixture Validation — Structural changes detected

Category Count
New keys 60
Missing keys 0
Type mismatches 0
Value mismatches 7 (informational)

The committed fixture schema is out of date. To update, comment:

@metamaskbot update-mobile-fixture

View full details | Download diff report

@bfullam bfullam marked this pull request as ready for review March 5, 2026 16:31
@bfullam bfullam requested a review from a team as a code owner March 5, 2026 16:31
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
);
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Additional Locations (1)

Fix in Cursor Fix in Web

@bfullam bfullam merged commit 18be11f into swaps-4038-trending-tokens Mar 6, 2026
108 of 112 checks passed
@bfullam bfullam deleted the swaps-4038-trending-e2e branch March 6, 2026 08:01
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 6, 2026
@bfullam bfullam restored the swaps-4038-trending-e2e branch March 6, 2026 08:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-M team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants