Skip to content

test: Migrate page objects to unified framework (Onboarding)#27956

Merged
christopherferreira9 merged 2 commits into
mainfrom
MMQA-1647
Mar 26, 2026
Merged

test: Migrate page objects to unified framework (Onboarding)#27956
christopherferreira9 merged 2 commits into
mainfrom
MMQA-1647

Conversation

@cortisiko

@cortisiko cortisiko commented Mar 26, 2026

Copy link
Copy Markdown
Member

Description

Updates several onboarding test page objects to use the unified cross-runner abstraction (encapsulated elements + UnifiedGestures/encapsulatedAction) instead of Detox-only Gestures.

Adds Appium/Playwright locator support (including iOS XPath fallbacks) and new helper methods for visibility checks and alternate onboarding/non-onboarding flows (notably SRP entry and continue button behavior in ImportWalletView, plus CreatePasswordView field handling).

Extends WalletView with unified elements and actions to long-press and edit the account name label.

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

Medium Risk
Moderate risk because it changes selector strategies and interaction flows across multiple onboarding E2E page objects, which could introduce cross-platform/Appium locator flakiness or regress existing Detox tests.

Overview
Updates several onboarding test page objects to use the unified cross-runner abstraction (encapsulated elements + UnifiedGestures/encapsulatedAction) instead of Detox-only Gestures.

Adds Appium/Playwright locator support (including iOS XPath fallbacks) and new helper methods for visibility checks and alternate onboarding/non-onboarding flows (notably SRP entry and continue button behavior in ImportWalletView, plus CreatePasswordView field handling).

Extends WalletView with unified elements and actions to long-press and edit the account name label.

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

@cortisiko cortisiko requested a review from a team as a code owner March 26, 2026 00:46
@metamaskbot metamaskbot added the team-qa QA team label Mar 26, 2026
@cortisiko cortisiko added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Mar 26, 2026
@github-actions github-actions Bot added the risk-high Extensive testing required · High bug introduction risk label Mar 26, 2026
@github-actions github-actions Bot added risk-high Extensive testing required · High bug introduction risk and removed risk-high Extensive testing required · High bug introduction risk labels Mar 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokeAccounts, SmokeIdentity, SmokeConfirmations, SmokeTrade, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeMultiChainAPI, SmokeRamps, SmokePerps, SmokePredictions, SmokeCard, FlaskBuildTests
  • Selected Performance tags: @PerformanceOnboarding
  • Risk Level: high
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
These changes modify 9 onboarding page objects and WalletView.ts — all critical test infrastructure files.

Why all tags are selected:

  1. Onboarding page objects are universally shared: The wallet.flow.ts imports ALL of the changed onboarding page objects (CreatePasswordView, ImportWalletView, MetaMetricsOptInView, OnboardingSheet, OnboardingSuccessView, OnboardingView, ProtectYourWalletView, SkipAccountSecurityModal, TermsOfUseModal) and exposes loginToApp, CreateNewWallet, and importWalletWithRecoveryPhrase functions.

  2. loginToApp is used by virtually every smoke test: Confirmed via grep — tests in swap, confirmations, ramps, multichain, predict, trending, identity, accounts, perps, snaps, and more all call loginToApp() from wallet.flow.ts.

  3. Migration pattern introduces risk: The changes migrate from simple Detox-only element getters to encapsulated() wrappers with encapsulatedAction() dispatch. While backward-compatible for Detox, any subtle behavioral change (e.g., in asDetoxElement() unwrapping, timing differences in UnifiedGestures vs Gestures) could break the onboarding flow for all tests.

  4. WalletView.ts changes: New accountNameLabelText and accountNameLabelInput encapsulated getters, plus longPressAccountNameLabel and editAccountNameLabel methods. WalletView is the main wallet screen used by all tests after login.

  5. Specific high-risk changes:

    • tapContinueButton in ImportWalletView now uses UnifiedGestures.waitAndTap unconditionally for onboarding=true path (previously used Gestures.tap)
    • tapIUnderstandCheckBox in SkipAccountSecurityModal now uses UnifiedGestures.waitAndTap (previously Gestures.waitAndTap)
    • tapAgreeButton in MetaMetricsOptIn now delegates to tapIAgreeButton which has different Detox behavior (swipe then tap)
    • New proceedWithoutWalletSecure() convenience method in SkipAccountSecurityModal
  6. SmokeWalletPlatform directly: Seedless tests (google/apple login flows) use OnboardingView and OnboardingSheet directly; analytics tests use CreateNewWallet/importWalletWithRecoveryPhrase.

  7. FlaskBuildTests: Snaps tests also use loginToApp from wallet.flow.ts.

The conservative approach of running all tags is warranted because the onboarding flow is the entry point for essentially all E2E tests.

Performance Test Selection:
The onboarding page objects (CreatePasswordView, ImportWalletView, OnboardingView, etc.) are directly used in the onboarding performance test flow. Changes to how these page objects interact with elements (migration to encapsulated/UnifiedGestures) could affect timing measurements in the @PerformanceOnboarding test. Other performance tests (Login, Launch, AccountList, Swaps, etc.) use loginToApp which relies on these page objects, but their primary measurement focus is post-onboarding. @PerformanceOnboarding is the most directly impacted.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

Copy link
Copy Markdown

@christopherferreira9 christopherferreira9 added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit 37ca45a Mar 26, 2026
200 of 203 checks passed
@christopherferreira9 christopherferreira9 deleted the MMQA-1647 branch March 26, 2026 10:08
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 26, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 26, 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.72.0 Issue or pull request that will be included in release 7.72.0 risk-high Extensive testing required · High bug introduction risk size-XL team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants