Skip to content

test: multichain tests Appium migration - #34151

Merged
davibroc merged 9 commits into
mainfrom
test/migrate-multichain-e2e
Aug 4, 2026
Merged

test: multichain tests Appium migration#34151
davibroc merged 9 commits into
mainfrom
test/migrate-multichain-e2e

Conversation

@davibroc

@davibroc davibroc commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

This PR took care of the following:

  • Migrated Multichain API smoke tests from Detox to Appium (tests/smoke-appium/multichain/)
  • Fixed wallet-invokeMethod.spec.ts and wallet-notify.spec.ts that were failing and disabled on Detox
  • Rewrote MultichainTestDApp to use in-app WebView CDP helpers
  • Added SmokeMultiChainAPI Appium CI jobs (Android + iOS)
  • Removed old Detox Multichain jobs

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

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.

Note

Low Risk
Changes are confined to E2E/CI and test helpers; no production wallet or auth logic is modified.

Overview
Moves SmokeMultiChainAPI coverage from Detox E2E to Appium: new tests/smoke-appium/multichain/ specs (create/get/revoke session, wallet_invokeMethod, EIP-5792, wallet_sessionChanged, notify) and matching Android/iOS Appium workflow jobs (2-way split). Detox multichain-api-*-smoke jobs and tests/smoke/multichain/* specs are removed from the smoke rollup.

MultichainTestDApp is rewritten for Playwright/Appium: fixed localhost dapp on port 8093, Playwright login/browser flows, and CDP/WebView helpers instead of Detox WebView matchers. ChromeCdpHelpers gains MetaMask in-app WebView CDP (Android webview_devtools_remote, iOS context switching) for click/evaluate/poll on dapp DOM; dapp URL matching now treats localhost like the multichain test dapp title fallback.

wallet_notify Appium test is present but skipped on emulator until live mainnet block events or a mock fixture exist.

Reviewed by Cursor Bugbot for commit cda03c7. Bugbot is set up for automated code reviews on this repo. Configure here.

@davibroc
davibroc requested a review from a team as a code owner July 31, 2026 16:04
@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 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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

Warnings — informational, address before merging:

  • Related issues section is empty. Add Fixes: #123 / Closes: <URL> / Refs: <Jira key>, or write a short rationale after the colon.
  • Manual testing steps still contain template content (the Gherkin example title or a [...] placeholder). Replace with real steps, or write N/A — <reason>.
  • Screenshots/Recordings section is empty. Add an image/video for user-facing changes, logs/console output for non-user-facing changes, or write N/A if no evidence is applicable.

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

Comment thread tests/smoke-appium/multichain/wallet-invokeMethod.spec.ts Outdated
Comment thread tests/page-objects/Browser/MultichainTestDApp.ts
Comment thread tests/page-objects/Browser/MultichainTestDApp.ts
@davibroc
davibroc force-pushed the test/migrate-multichain-e2e branch from 024b58c to d28688b Compare July 31, 2026 16:13
@davibroc davibroc added team-qa QA team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Jul 31, 2026
@github-actions github-actions Bot added size-XL risk:low AI analysis: low risk labels Jul 31, 2026
Comment thread tests/page-objects/Browser/MultichainTestDApp.ts
Comment thread tests/smoke-appium/multichain/wallet-revokeSession.spec.ts
@github-actions github-actions Bot added risk:medium AI analysis: medium risk and removed risk:low AI analysis: low risk labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 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.

Comment thread tests/smoke-appium/multichain/wallet-invokeMethod.spec.ts Outdated
@github-actions github-actions Bot added risk:low AI analysis: low risk risk:medium AI analysis: medium risk and removed risk:medium AI analysis: medium risk risk:low AI analysis: low risk labels Aug 3, 2026
@davibroc
davibroc force-pushed the test/migrate-multichain-e2e branch from 09b1df5 to eabf483 Compare August 4, 2026 07:57

@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.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eabf483. Configure here.

Comment thread .github/workflows/run-e2e-smoke-tests-android.yml Outdated
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeMultiChainAPI, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeMMConnect
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: high
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR is a significant migration of SmokeMultiChainAPI tests from Detox to Appium, with supporting infrastructure changes:

  1. SmokeMultiChainAPI (primary): All changed spec files are tagged with SmokeMultiChainAPI. New Appium specs added in tests/smoke-appium/multichain/ (wallet-createSession, wallet-getSession, wallet-revokeSession, wallet-invokeMethod, wallet-invokeMethod-eip5792, wallet-notify, wallet-sessionChanged). Old Detox specs in tests/smoke/multichain/ deleted or renamed to .failing.ts. CI workflows updated to move SmokeMultiChainAPI from Detox (run-e2e-smoke-tests) to Appium (run-appium-smoke-tests). These new tests must be validated.

  2. SmokeNetworkAbstractions and SmokeNetworkExpansion: Required by SmokeMultiChainAPI tag description — 'When selecting SmokeMultiChainAPI, also select SmokeNetworkAbstractions (permission UI) and SmokeNetworkExpansion (multi-chain provider).'

  3. SmokeMMConnect: ChromeCdpHelpers.ts was modified with a port-matching fix (:8090 regex → dappUrl.includes('localhost')) that affects how the multichain dapp target is identified. The SmokeMMConnect test connection-multichain.spec.ts directly imports and uses ChromeCdpHelpers. Similarly, PlaywrightContextHelpers.ts has the same fix. These changes could affect MMConnect test behavior.

Infrastructure changes: The CI workflow changes (removing SmokeMultiChainAPI from Detox workflows, adding to Appium workflows) need to be validated by running the actual SmokeMultiChainAPI tests through the new Appium pipeline.

No performance impact: All changes are test infrastructure and test spec migrations — no app code was changed. No performance tests are needed.

Performance Test Selection:
All changes in this PR are test infrastructure: migrating SmokeMultiChainAPI specs from Detox to Appium, updating CI workflows, rewriting the MultichainTestDApp page object, and adding WebView CDP helpers. No app source code was modified. There is no performance impact on the app itself, so no performance tests are needed.

View GitHub Actions results

@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@davibroc
davibroc added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 45de229 Aug 4, 2026
116 of 118 checks passed
@davibroc
davibroc deleted the test/migrate-multichain-e2e branch August 4, 2026 09:19
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 4, 2026
@metamask-ci metamask-ci Bot added the release-8.7.0 Issue or pull request that will be included in release 8.7.0 label Aug 4, 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-8.7.0 Issue or pull request that will be included in release 8.7.0 risk:medium AI analysis: medium risk size-XL team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants