Skip to content

test: add mocks for ramps endpoints#26042

Merged
cortisiko merged 3 commits intomainfrom
MMQA-1426
Feb 13, 2026
Merged

test: add mocks for ramps endpoints#26042
cortisiko merged 3 commits intomainfrom
MMQA-1426

Conversation

@cortisiko
Copy link
Copy Markdown
Member

@cortisiko cortisiko commented Feb 12, 2026

Description

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

Low Risk
Test-only changes that adjust mock endpoints and fixtures; risk is limited to potential E2E flakiness if URL patterns or response shapes don’t match what the app requests.

Overview
Expands E2E API mocking for on-ramp (ramps) flows to cover additional Unified Buy endpoints and reduce reliance on live network calls.

Default mocks now include UAT v2 endpoints for topTokens, providers, and payments, and region-aware setup adds corresponding handlers (plus legacy tokens fallback) and updates geolocation mocking to explicitly include prod/dev/uat URLs. Mock response fixtures are extended with Base network support and realistic UAT-shaped payloads for tokens, providers, and payment methods, while some prod allowlist/mocks for on-ramp hosts are removed.

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

@cortisiko cortisiko requested a review from a team as a code owner February 12, 2026 22:17
@metamaskbot metamaskbot added the team-qa QA team label Feb 12, 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.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeRamps
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 5 changed files are E2E test infrastructure files specifically for Ramps (on-ramp/off-ramp) API mocking:

  1. mock-e2e-allowlist.ts: Removed 3 on-ramp UAT hosts from allowlist (now mocked instead of allowed through)
  2. onramp-apis.ts: Added new V2 API mock responses (topTokens, providers, payments) and removed duplicate prod endpoint
  3. ramps-geolocation.ts: Refactored geolocation response creation with better comments
  4. ramps-mocks.ts: Added Base network to networks response and extensive new V2 mock responses (RAMPS_TOP_TOKENS_RESPONSE, RAMPS_PROVIDERS_RESPONSE, RAMPS_PAYMENTS_V2_RESPONSE)
  5. ramps-region-aware-mock-setup.ts: Simplified to UAT-only endpoints, added V2 endpoint mocks, added fallback catch-all for tokens endpoint

These mocks are used by tests in tests/smoke/ramps/ (offramp-token-amount.spec.ts, onramp-unified-buy.spec.ts) and tests/regression/ramps/. Running SmokeRamps will validate that the mock changes work correctly with the existing Ramps tests.

No application code is changed, so this is purely a test infrastructure update. The changes are significant enough to warrant running the affected tests to ensure the mocks still work correctly.

Performance Test Selection:
These changes are purely E2E test infrastructure changes (API mocking for Ramps tests). No application code is modified, so there is no potential impact on app performance. The changes only affect how tests mock API responses, not how the app renders or processes data.

View GitHub Actions results

@cortisiko cortisiko self-assigned this Feb 12, 2026
@cortisiko cortisiko added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Feb 12, 2026
@sonarqubecloud
Copy link
Copy Markdown

@cortisiko cortisiko added this pull request to the merge queue Feb 13, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 13, 2026
@cortisiko cortisiko added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit d6a8a08 Feb 13, 2026
92 of 93 checks passed
@cortisiko cortisiko deleted the MMQA-1426 branch February 13, 2026 05:53
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 13, 2026
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.67.0 Issue or pull request that will be included in release 7.67.0 size-L team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants