test: add appwright test configurations for mm-connect with Browserstack local#25990
Conversation
…Stack - Added new scripts in `package.json` for running MM Connect tests on BrowserStack, including local tunnel support. - Updated `appwright.config.ts` to define specific test matches for MM Connect scenarios. - Enhanced the `BrowserStackDeviceProvider` to support local testing capabilities. - Updated README with instructions for running MM Connect tests locally and on BrowserStack. This improves the testing framework for MM Connect, allowing for better integration with BrowserStack's local testing features.
|
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. |
- Updated the resolution hash for the appwright patch in `yarn.lock` to ensure correct versioning. - Modified the checksum for the appwright dependency to reflect recent changes in the patch file. - Adjusted the `appwright-npm-0.1.45-f282bc1c1b.patch` to maintain consistency with the updated resolution.
- Updated the resolution hash for the appwright patch in `yarn.lock` to ensure correct versioning. - Modified the checksum for the appwright dependency to reflect recent changes in the patch file. - Adjusted the `appwright-npm-0.1.45-f282bc1c1b.patch` to maintain consistency with the updated resolution.
Resolve conflicts by adopting main's tests/ layout: - package.json: use tests/appwright.config.ts, add mm-connect-android-bs and mm-connect-android-bs-local scripts - tests/appwright.config.ts: use **/performance/mm-connect/** for mm-connect projects - tests/framework/utils/MobileBrowser.js: main import paths, keep Chrome clear/FRE/modal/switchToMobileBrowser logic - tests/performance/README.md: main structure, keep mm-connect project table and docs - tests/performance/mm-connect/connection-multichain.spec.js: import from ../../framework/utils/MobileBrowser.js, keep switchToMobileBrowser Co-authored-by: Cursor <cursoragent@cursor.com>
- Updated the `BROWSERSTACK_LOCAL` environment variable handling in the Appwright patch to ensure it correctly checks for string values. - Removed the `BROWSERSTACK_LOCAL` variable from the performance test runner workflow to streamline the configuration. - Revised the performance test documentation to clarify the usage of `BROWSERSTACK_LOCAL` and its impact on BrowserStack capabilities.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Per the guidance: "Changes to wdio/ or tests/performance directories (separate test frameworks) do not require Detox tags - select none unless app code is also changed." No app code is modified in this PR - all changes are isolated to the performance test infrastructure which uses a completely separate test framework (appwright) from the Detox E2E tests. Performance Test Selection: |
|



Description
package.jsonfor running MM Connect tests on BrowserStack, including local tunnel support.appwright.config.tsto define specific test matches for MM Connect scenarios.BrowserStackDeviceProviderto support local testing capabilities.This improves the testing framework for MM Connect, allowing for better integration with BrowserStack's local testing features.
Changelog
CHANGELOG entry:
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1419
Manual testing steps
Screenshots/Recordings
Before
After
Test run passes on browserstack
No impact on existing appwright performance tests workflows.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches test infrastructure and the patched
appwrightruntime (BrowserStack/Appium capabilities, locator selection), which can change how CI sessions are created and how elements are resolved across many tests, but does not affect production app code.Overview
Enables running MM Connect performance tests on BrowserStack with optional BrowserStack Local tunneling, including new
package.jsonscripts and doc updates, and updates the multichain connect spec to usebs-local.comwhenBROWSERSTACK_LOCAL=trueand to switch back to the existing browser tab after approvals.Hardens Android browser automation by clearing/launching Chrome with FRE disabled, dismissing common first-run modals with bounded timeouts, and making navigation more resilient when the search box is missing.
Updates the patched
appwright@0.1.45provider behavior for CI stability/perf: single-worker/single-retry defaults, improved element lookup whentextToMatchis unset, added Appium chromedriver auto-download support, expanded BrowserStack capabilities (local flag, build name override, logging/profiling/self-heal, and Appium settings), and allows skipping BrowserStack video downloads viaDISABLE_VIDEO_DOWNLOAD(set in the performance runner workflow).Written by Cursor Bugbot for commit ce3dada. This will update automatically on new commits. Configure here.