Skip to content

test: migrate MMConnect multichain e2e from performance BrowserStack to Appium smoke CI#33380

Draft
chrisleewilcox wants to merge 21 commits into
mainfrom
MMQA-1982-smoke-mmconnect-thin-slice
Draft

test: migrate MMConnect multichain e2e from performance BrowserStack to Appium smoke CI#33380
chrisleewilcox wants to merge 21 commits into
mainfrom
MMQA-1982-smoke-mmconnect-thin-slice

Conversation

@chrisleewilcox

@chrisleewilcox chrisleewilcox commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

Add a thin-slice Appium smoke path for the active MMConnect multichain browser test, using the standard e2e CI wallet (fixtures) instead of the BrowserStack baked-SRP performance path.

This is a reset of the earlier approach (#31937, closed). Per team guidance: fixtures + scenarioType: 'e2e', CI mocking via withFixtures/DEFAULT_MOCKS, and Chrome on CI via google_apis.

  • Add SmokeMMConnect tag and yarn appium-smoke:mmconnect:android
  • Add tests/smoke-appium/mm-connect/connection-multichain.spec.ts with withFixtures, Solana permission fixture, e2e login, and safelyOnboardChrome: true
  • Wire appium-mmconnect-android-smoke (1 shard, 35 min) with android-tag: google_apis

Not in this PR: removing MMConnect from the performance workflow, migrating the other 11 skipped specs (WAPI-1511).

Changelog

CHANGELOG entry: null

Related issues

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

Manual testing steps

Feature: SmokeMMConnect thin slice discovery and local run

  Scenario: suite is discoverable under SmokeMMConnect tag
    Given the branch is checked out locally

    When I run `yarn playwright test --config tests/playwright.smoke-appium.config.ts --project android-smoke --grep SmokeMMConnect --list`
    Then 1 test is listed: connection-multichain under SmokeMMConnect

  Scenario: active MMConnect test runs on local Android emulator
    Given a main-e2e release APK is available and a google_apis Android emulator is running

    When I run `yarn appium-smoke:mmconnect:android` with ANDROID_APK_PATH set to the main-e2e APK
    Then connection-multichain.spec.ts passes

Screenshots/Recordings

No app UI changes — CI/test infrastructure thin slice. Evidence is the before/after migration below.

Before

Active MMConnect multichain test lived only in the performance BrowserStack pipeline:

Area Before
Suite path tests/performance/mm-connect/connection-multichain.spec.ts
Tag Performance
Wallet Baked SRP / loginToAppPlaywright()E2E_PASSWORD
Mocks Live/network (no withFixtures)
CI Performance BrowserStack workflow
Chrome BrowserStack device Chrome + optional BS Local

After

Thin slice on Appium smoke CI with the standard e2e wallet:

Area After
Suite path tests/smoke-appium/mm-connect/connection-multichain.spec.ts
Tag SmokeMMConnect
Wallet withFixtures + FixtureBuilder().withSolanaAccountPermission() + scenarioType: 'e2e'
Mocks DEFAULT_MOCKS via withFixtures
CI appium-mmconnect-android-smoke (google_apis for Chrome)
Chrome Emulator Chrome + safelyOnboardChrome: true
Performance suite Still present on main (removal is follow-up after this job is green)

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

Made with Cursor

Migrate the active connection-multichain spec to smoke-appium with e2e
fixtures and wire appium-mmconnect-android-smoke on google_apis for Chrome.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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.

@metamask-ci metamask-ci Bot added the team-qa QA team label Jul 15, 2026
@chrisleewilcox chrisleewilcox self-assigned this Jul 15, 2026
@metamask-ci

metamask-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PR template — items to address before "Ready for review"

Warnings — informational, address before merging:

  • Pre-merge author checklist has unchecked items (e.g. "I've documented my code using JSDoc format if applicable"). Every box must be consciously checked — see docs/readme/ready-for-review.md.

See docs/readme/ready-for-review.md for the full Definition of Ready for Review.

@chrisleewilcox chrisleewilcox changed the title test: add SmokeMMConnect thin slice for multichain Appium smoke test: migrate MMConnect multichain e2e from performance BrowserStack to Appium smoke CI Jul 15, 2026
chrisleewilcox and others added 3 commits July 15, 2026 13:02
Format mm-connect utils for CI format:check. Harden Android Chrome launch
(clear → FRE flags → force-stop) and open dapp URLs via VIEW intent to
avoid flaky omnibox selectors on google_apis emulators.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
PlaywrightElement exposes isVisible, not isDisplayed — fixes lint:tsc.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov-commenter

codecov-commenter commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.40%. Comparing base (96abde9) to head (db35b77).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #33380    +/-   ##
========================================
  Coverage   84.40%   84.40%            
========================================
  Files        6133     6134     +1     
  Lines      163917   163804   -113     
  Branches    40007    39988    -19     
========================================
- Hits       138354   138265    -89     
+ Misses      16054    16050     -4     
+ Partials     9509     9489    -20     

☔ View full report in Codecov by Harness.
📢 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.

chrisleewilcox and others added 2 commits July 15, 2026 13:58
CI loaded the playground in Chrome but Appium selected MetaMask's
webview when URL metadata was stale. Prefer WEBVIEW_chrome for http
dapps, accept emulator host aliases, and fix VIEW intent -p packaging.

Co-authored-by: Cursor <cursoragent@cursor.com>
After opening the dapp via VIEW intent, dismiss leftover Chrome dialogs
and only skip omnibox navigation when the NTP search placeholder is gone.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added size-L and removed size-M labels Jul 15, 2026
Appium switchContext(WEBVIEW_chrome) hangs during Chromedriver session
creation on google_apis Chrome 113 despite a live debugger URL. Bypass
Chromedriver for smoke by attaching over CDP and use localhost+adb reverse.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🧪 Flaky unit test detection

✅ All previously detected unit test flakiness issues in this PR have been fixed.

View recent run history

This check is informational only and does not block merging.

chrisleewilcox and others added 4 commits July 15, 2026 15:54
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added size-XL and removed size-L labels Jul 16, 2026
chrisleewilcox and others added 7 commits July 15, 2026 21:41
Synthetic JS clicks never reach MetaMask because the SDK defers
metamask:// navigation; use trusted CDP mouse input and Appium deepLink.

Co-authored-by: Cursor <cursoragent@cursor.com>
Location.href hooks miss Chrome-sealed setters; rebuild metamask:// from
the SDK session payload and wait longer for transport session_request.

Co-authored-by: Cursor <cursoragent@cursor.com>
CI video shows Choose activity with "metamask"; stop blocking on CDP
URL capture and match the chooser case-insensitively.

Co-authored-by: Cursor <cursoragent@cursor.com>
CI opened MetaMask home without a pending request because package
foreground alone skipped the chooser; deepLink the session URL and wait
for connect-button.

Co-authored-by: Cursor <cursoragent@cursor.com>
CI recordings show Enter password after deeplink; unlock was never
reached because the connect-sheet wait timed out first.

Co-authored-by: Cursor <cursoragent@cursor.com>
Play services heads-up left Unlock non-interactive; full loginToAppPlaywright also waits for wallet home after a connect deeplink. Use a light unlock with retries and restore the loginToAppPlaywright import for account-group helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
The google_apis CI emulator shows an "Enable Google Play services" banner over the lock screen, which blocks UiAutomator2 from tapping Unlock. Collapse the shade, cancel notifications, and swipe the heads-up away before each unlock attempt.

Co-authored-by: Cursor <cursoragent@cursor.com>
chrisleewilcox and others added 3 commits July 16, 2026 01:27
Co-authored-by: Cursor <cursoragent@cursor.com>
Chrome connect leaves MetaMask locked under the Play services heads-up long
enough for the dapp SDK to time out; disable fixture auto-lock and unlock
without waiting for UiAutomator interactive.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeSwap, SmokeStake, SmokeWalletPlatform, SmokeMoney, SmokePerps, SmokeMultiChainAPI, SmokePredictions, SmokeSeedlessOnboarding, SmokeBrowser, SmokeSnaps, SmokeMMConnect
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: high
  • AI Confidence: 100%
click to see 🤖 AI reasoning details

E2E Test Selection:
Hard rule (test-framework-infra-change): Test framework infrastructure changed: tests/framework/fixtures/FixtureBuilder.ts. Running all tests.

Performance Test Selection:
No app code changes in this PR — all changes are test infrastructure, CI workflows, and test utilities. The tests/performance/mm-connect/utils.ts change is a cosmetic refactor (moving unlockIfLockScreenVisible to a shared location, removing the old inline implementation). No performance spec files were added or modified with new performance tags. The PlaywrightContextHelpers.ts, PlaywrightUtilities.ts, and native-browser.flow.ts changes are test-side helpers for Chrome navigation on google_apis emulators, not app code that would affect measured performance metrics. No performance tags should run.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants