Skip to content

test: E2E swap test using RWA#26325

Merged
vivek-consensys merged 12 commits into
mainfrom
test-e2e-swap-rwa
Feb 20, 2026
Merged

test: E2E swap test using RWA#26325
vivek-consensys merged 12 commits into
mainfrom
test-e2e-swap-rwa

Conversation

@vivek-consensys

@vivek-consensys vivek-consensys commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Description

E2E test mocking the swap of USDC -> GOOGLEON

Changelog

CHANGELOG entry: E2E swap test using RWA

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 changes (new mocks/fixtures and a new E2E spec) with no production code paths affected.

Overview
Adds a new regression spec swap-token-rwa.spec.ts that executes and validates a USDC->GOOGLON swap end-to-end (balance changes and activity completion) using the unified swap UI.

Extends swap E2E mocks and fixtures to support the RWA token by adding GOOGLON to the popular token list, providing spot price entries, and introducing a dedicated GET_QUOTE_USDC_GOOGLON_RESPONSE quote mock keyed off the destination token address.

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

@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 team-accounts-framework Accounts team INVALID-PR-TEMPLATE PR's body doesn't match template labels Feb 20, 2026
@vivek-consensys vivek-consensys marked this pull request as ready for review February 20, 2026 06:05
Comment thread tests/helpers/swap/constants.ts
Comment thread tests/helpers/swap/constants.ts Outdated
Comment thread tests/regression/swap/swap-token-rwa.spec.ts Outdated
@vivek-consensys vivek-consensys changed the title E2E swap test using RWA test: E2E swap test using RWA Feb 20, 2026
@vivek-consensys vivek-consensys requested a review from a team as a code owner February 20, 2026 06:26
@vivek-consensys vivek-consensys requested review from Akaryatrh and removed request for a team February 20, 2026 06:30

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Comment thread tests/helpers/swap/swap-mocks.ts Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeTrade, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR adds test infrastructure for RWA (Real World Asset) token swaps:

  1. tests/helpers/swap/constants.ts: Added GOOGLON token to popular tokens list and a complete quote response for USDC->GOOGLON swap
  2. tests/helpers/swap/swap-mocks.ts: Added GOOGLON token address, spot price mocks, and a new mock endpoint for USDC->GOOGLON quotes
  3. tests/regression/swap/swap-token-rwa.spec.ts: New regression test for USDC->GOOGLON swap using RegressionTrade tag

All changes are purely additive to test infrastructure - no application code is modified. The swap-mocks.ts file is shared by smoke tests (swap-deeplink-smoke.spec.ts, swap-action-smoke.spec.ts, gasless-swap.spec.ts) and bridge mocks. While the changes don't modify existing mock behavior (only add new endpoints), running SmokeTrade validates that the swap smoke tests still work correctly with the modified shared mocks.

Per the tag guidance, SmokeTrade requires SmokeConfirmations since swap flows include transaction confirmations.

Performance Test Selection:
These changes are purely test infrastructure additions (mock data and a new regression test). No application code is modified that could impact UI rendering, data loading, or app performance. The changes add mock endpoints for a new token type but don't affect how the app processes or displays data.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@davibroc davibroc left a comment

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.

LGTM

@vivek-consensys vivek-consensys added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit ed83087 Feb 20, 2026
95 checks passed
@vivek-consensys vivek-consensys deleted the test-e2e-swap-rwa branch February 20, 2026 18:04
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 20, 2026
@metamaskbot metamaskbot added the release-7.68.0 Issue or pull request that will be included in release 7.68.0 label Feb 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-7.68.0 Issue or pull request that will be included in release 7.68.0 size-M team-accounts-framework Accounts team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants