Skip to content

test: Removed legacy swap test code and selectors#24947

Merged
davibroc merged 3 commits intomainfrom
test/move-swap-selectors
Jan 23, 2026
Merged

test: Removed legacy swap test code and selectors#24947
davibroc merged 3 commits intomainfrom
test/move-swap-selectors

Conversation

@davibroc
Copy link
Copy Markdown
Contributor

@davibroc davibroc commented Jan 20, 2026

Description

THis PR removes legacy swaps e2e test code and selectors

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

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

Streamlines e2e/testing by deleting old swaps artifacts and standardizing on bridge selectors.

  • Replaces imports of Swaps/QuoteView.testIds with e2e/selectors/Bridge/QuoteView.selectors in tests and helpers
  • Deletes legacy files: SwapsView.testIds.ts, QuotesModal.testIds.ts, e2e/pages/swaps/SwapView.ts, e2e/pages/swaps/QuoteModal.ts, and an unused anvil spec
  • Updates performance specs to remove SwapScreen usage and rely on BridgeScreen for swap/bridge flows
  • Adjusts BridgeScreen and Detox page objects to use new selector paths and removes obsolete "Get quotes" tap
  • SliderButton: removes unused testID prop reference

Written by Cursor Bugbot for commit 0cc87ef. This will update automatically on new commits. Configure here.

@davibroc davibroc requested review from a team as code owners January 20, 2026 18:23
@github-actions
Copy link
Copy Markdown
Contributor

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-qa QA team label Jan 20, 2026
@davibroc davibroc added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Jan 20, 2026
Copy link
Copy Markdown

@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.

GeorgeGkas
GeorgeGkas previously approved these changes Jan 21, 2026
Copy link
Copy Markdown
Contributor

@GeorgeGkas GeorgeGkas left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@davibroc davibroc force-pushed the test/move-swap-selectors branch from ba0c737 to 0cc87ef Compare January 23, 2026 20:32
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeTrade
  • Risk Level: medium
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

This PR is a cleanup/refactoring of E2E test infrastructure for swap/bridge functionality:

  1. Deleted unused files:

    • e2e/pages/swaps/QuoteModal.ts - Not imported anywhere
    • e2e/pages/swaps/SwapView.ts - Only used in the deleted example-anvil-e2e.spec.ts
    • app/components/UI/Swaps/QuotesModal.testIds.ts - Only used by deleted QuoteModal.ts
    • app/components/UI/Swaps/SwapsView.testIds.ts - Only used by deleted SwapView.ts and SliderButton
    • e2e/specs/settings/example-anvil-e2e.spec.ts - Was already skipped
  2. Moved selector file:

    • app/components/UI/Swaps/QuoteView.testIds.tse2e/selectors/Bridge/QuoteView.selectors.ts
    • Import paths updated in e2e/pages/swaps/QuoteView.ts, BridgeView.view.test.tsx, and wdio/screen-objects/BridgeScreen.js
  3. App code change:

    • SliderButton/index.js - Removed testID that referenced deleted SwapsViewSelectorsIDs
  4. Appwright changes:

    • Removed unused SwapScreen imports from performance tests (appwright framework, not Detox)

The QuoteView.ts page object is actively used by SmokeTrade tests:

  • bridge-action-smoke.spec.ts - Tests bridge functionality
  • swap-deeplink-smoke.spec.ts - Tests swap deep links
  • gasless-swap.spec.ts - Tests gasless swaps
  • helpers/swap-unified-ui.ts - Helper for swap tests

Since the selector file was moved and imports updated, running SmokeTrade tests will verify the refactoring doesn't break the swap/bridge E2E tests. The appwright/wdio changes don't require Detox tags.

View GitHub Actions results

@github-actions github-actions bot added size-M and removed size-S labels Jan 23, 2026
@sonarqubecloud
Copy link
Copy Markdown

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.91%. Comparing base (dfb0881) to head (0cc87ef).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #24947   +/-   ##
=======================================
  Coverage   79.91%   79.91%           
=======================================
  Files        4257     4254    -3     
  Lines      109283   109277    -6     
  Branches    22870    22870           
=======================================
- Hits        87335    87333    -2     
+ Misses      15896    15893    -3     
+ Partials     6052     6051    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davibroc davibroc disabled auto-merge January 23, 2026 22:43
@davibroc davibroc enabled auto-merge January 23, 2026 22:43
@davibroc davibroc added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit 10e2fae Jan 23, 2026
145 of 147 checks passed
@davibroc davibroc deleted the test/move-swap-selectors branch January 23, 2026 23:16
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
@metamaskbot metamaskbot added the release-7.65.0 Issue or pull request that will be included in release 7.65.0 label Jan 23, 2026
@metamaskbot metamaskbot added release-7.64.0 Issue or pull request that will be included in release 7.64.0 and removed release-7.65.0 Issue or pull request that will be included in release 7.65.0 labels Feb 3, 2026
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-7.64.0 on PR. Adding release label release-7.64.0 on PR and removing other release labels(release-7.65.0), as PR was added to branch 7.64.0 when release was cut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.64.0 Issue or pull request that will be included in release 7.64.0 size-M team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants