Skip to content

test(e2e): share Android WebView helpers via multi-platform WebView API - #33874

Merged
cmd-ob merged 11 commits into
mainfrom
e2e/android-webview-shared-helpers
Jul 28, 2026
Merged

test(e2e): share Android WebView helpers via multi-platform WebView API#33874
cmd-ob merged 11 commits into
mainfrom
e2e/android-webview-shared-helpers

Conversation

@cmd-ob

@cmd-ob cmd-ob commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Android WebView tap/fill/read lived behind snaps-only helpers and TestSnaps had many isAndroidAppium() branches. This PR introduces a multi-platform WebView framework facade (tapById / fillById / readTextById) that routes Android Appium to AndroidWebViewNative and iOS Appium/Detox to the existing web-context + Gestures path. TestSnaps now uses that single API, snaps helpers keep only scroll labels + load wait, and tab cleanup moves behind Browser.navigateToURL({ closeAllTabsIfOpen }).

Changelog

CHANGELOG entry: null

Related issues

Refs: #32877

Manual testing steps

N/A — E2E framework refactor only; no product UI changes. Validate by running existing Appium snap smoke specs (Android + iOS) and confirming Detox snap smoke still exercises TestSnaps via the shared WebView path.

Screenshots/Recordings

N/A — test framework / page-object refactor with no user-facing UI changes.

Before

N/A

After

N/A

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

@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 27, 2026
@cmd-ob
cmd-ob marked this pull request as ready for review July 27, 2026 19:12
@cmd-ob
cmd-ob requested review from a team as code owners July 27, 2026 19:12
@github-actions github-actions Bot added size-L risk:low AI analysis: low risk labels Jul 27, 2026
Comment thread tests/page-objects/Browser/TestSnaps.ts
Comment thread tests/framework/AndroidWebViewNative.ts
Comment thread tests/page-objects/Browser/TestSnaps.ts

@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 2de4a17. Configure here.

Comment thread tests/page-objects/Browser/TestSnaps.ts
@cmd-ob cmd-ob added the skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run label Jul 28, 2026
…ask/metamask-mobile into e2e/android-webview-shared-helpers
Comment thread tests/framework/AndroidWebViewNative.ts Outdated
Comment thread tests/framework/WebView.ts Outdated
Comment thread tests/page-objects/Browser/TestSnaps.ts Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found

All E2E tests pre-selected.

View GitHub Actions results

@cmd-ob
cmd-ob requested a review from GuillaumeRx July 28, 2026 09:43
@sonarqubecloud

Copy link
Copy Markdown

Comment thread tests/page-objects/Browser/TestSnaps.ts
@cmd-ob
cmd-ob requested a review from GuillaumeRx July 28, 2026 13:21
@cmd-ob
cmd-ob enabled auto-merge July 28, 2026 13:22
@cmd-ob
cmd-ob added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit 4ff57c8 Jul 28, 2026
300 of 302 checks passed
@cmd-ob
cmd-ob deleted the e2e/android-webview-shared-helpers branch July 28, 2026 13:56
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 2026
@metamask-ci metamask-ci Bot added the release-8.6.0 Issue or pull request that will be included in release 8.6.0 label Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.6.0 Issue or pull request that will be included in release 8.6.0 risk:low AI analysis: low risk size-L skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants