Skip to content

test: adds analytics verification to unified ramps flow#26109

Merged
christopherferreira9 merged 2 commits intomainfrom
cferreira/add-onramp-analytics
Feb 16, 2026
Merged

test: adds analytics verification to unified ramps flow#26109
christopherferreira9 merged 2 commits intomainfrom
cferreira/add-onramp-analytics

Conversation

@christopherferreira9
Copy link
Contributor

@christopherferreira9 christopherferreira9 commented Feb 16, 2026

Description

This PR adds e2e coverage for analytics events fired during the unified onramps flow.
Events checked:

  • Ramps Button Clicked
  • Ramps Token Selected

Changelog

CHANGELOG entry:

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1425

Manual testing steps

N/A

Screenshots/Recordings

N/A

Before

N/A

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 add stricter analytics assertions; risk is mainly increased e2e flakiness if event schemas or timing change.

Overview
Adds analytics verification to the onramp-unified-buy smoke test by capturing Segment/MetaMetrics events from the mock server at teardown and asserting expected events were emitted.

Introduces a second test that soft-asserts required properties and key values for Ramps Button Clicked and Ramps Token Selected, including region parsing/validation and routing/token/network expectations for the unified buy flow.

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

@christopherferreira9 christopherferreira9 added team-qa QA team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Feb 16, 2026
@github-actions
Copy link
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.

Copy link

@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 2 potential issues.

@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The change is limited to a single E2E test file tests/smoke/ramps/onramp-unified-buy.spec.ts. The modifications add analytics event validation to an existing onramp unified buy test:

  1. Added imports for analytics helpers (getEventsPayloads, EventPayload), SoftAssert, RampsRegion, and UnifiedRampRoutingType
  2. Added constants for expected analytics events (RampsButtonClicked, RampsTokenSelected)
  3. Modified the existing 'build quote' test to capture analytics events via endTestfn callback
  4. Added a new test case 'validates the segment events from the onramp unified buy test' that validates the captured analytics events

This is a test-only change with no application code modifications. The test file uses the SmokeRamps tag (visible in the code via describe(SmokeRamps('Onramp Unified Buy'), ...)). Running SmokeRamps will validate that the test changes work correctly. No other tags are needed as there are no changes to shared components, page objects, or application code that would affect other test suites.

Performance Test Selection:
No performance tests needed. This change is purely a test file modification that adds analytics event validation to an existing ramps test. There are no application code changes that could impact UI rendering, data loading, state management, or any user-facing performance characteristics.

View GitHub Actions results

@christopherferreira9 christopherferreira9 changed the title tests: adds analytics verification to unified ramps flow test: adds analytics verification to unified ramps flow Feb 16, 2026
@sonarqubecloud
Copy link

@christopherferreira9 christopherferreira9 added this pull request to the merge queue Feb 16, 2026
Merged via the queue into main with commit b5d7094 Feb 16, 2026
89 of 90 checks passed
@christopherferreira9 christopherferreira9 deleted the cferreira/add-onramp-analytics branch February 16, 2026 15:26
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 16, 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-M team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants