test: add MM Connect Wagmi and EVM Appwright E2E tests#21978
Conversation
This reverts commit 4d25abc.
|
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21978 +/- ##
==========================================
+ Coverage 79.86% 79.89% +0.03%
==========================================
Files 4218 4232 +14
Lines 107888 108501 +613
Branches 22558 22709 +151
==========================================
+ Hits 86163 86686 +523
- Misses 15704 15748 +44
- Partials 6021 6067 +46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…-connect-e2e-multichain-test-dapp
| } from '../../utils/MobileBrowser.js'; | ||
| import WalletMainScreen from '../../../wdio/screen-objects/WalletMainScreen.js'; | ||
| import MultiChainTestDapp from '../../../wdio/screen-objects/MultiChainTestDapp.js'; | ||
| import MultiChainEvmTestDapp from '../../../wdio/screen-objects/MultiChainEvmTestDapp.js'; |
There was a problem hiding this comment.
| return MobileBrowserScreen.tapChromeRefreshButton(); | ||
| } | ||
| throw new Error('Unsupported platform'); | ||
| } |
There was a problem hiding this comment.
Missing device assignment in refreshMobileBrowser causes silent failures
Medium Severity
The refreshMobileBrowser function does not set MobileBrowserScreen.device = device before calling screen object methods, unlike navigateToDappAndroid which correctly sets it. The MobileBrowserScreen methods check if (!this._device) and silently return without performing any action. If refreshMobileBrowser is called without navigateToDapp being called first, the refresh operation silently fails with no error.
christopherferreira9
left a comment
There was a problem hiding this comment.
Looks good for QA!
…t-dapp' into jl/mm-connect-e2e-multichain-test-dapp
| await MobileBrowserScreen.tapUrlBar(); | ||
| await AppwrightGestures.typeText(await MobileBrowserScreen.chromeUrlBar, url); | ||
| await MobileBrowserScreen.tapSelectDappUrl(dappName); | ||
| await MobileBrowserScreen.tapSelectDappUrl(); |
There was a problem hiding this comment.
Unused dappName parameter in navigation functions
Low Severity
The dappName parameter is declared in navigateToDappAndroid and navigateToDapp but never used. The implementation was changed to use chromeUrlEntry element instead of searching by dapp name text, but the parameter was not removed from the function signatures. Callers still pass dappName values that are silently ignored.
Additional Locations (1)
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis PR contains changes exclusively to the appwright and wdio test frameworks, which are separate from the Detox E2E testing framework. The changes include:
Critically, there are NO changes to:
Per the guidance: "Changes to wdio/ or appwright/ directories (separate test frameworks) do not require Detox tags - select none unless app code is also changed." Since all changes are confined to appwright/wdio infrastructure with no app code modifications, no Detox E2E tests need to run. |
|
christopherferreira9
left a comment
There was a problem hiding this comment.
Approving again for QA
|
Missing release label release-7.64.0 on PR. Adding release label release-7.64.0 on PR and removing other release labels(release-7.65.0), as PR was added to branch 7.64.0 when release was cut. |
|
No release label on PR. Adding release label release-7.64.0 on PR, as PR was added to branch 7.64.0 when release was cut. |



Description
Adds appwright tests for testing the MM Connect flows via native browser on Android for our EVM and Wagmi test dapps
Changelog
CHANGELOG entry: null
Related issues
Requires: MetaMask/connect-monorepo#96Manual testing steps
1. Pull https://github.com/MetaMask/connect-monorepo2.
yarn && yarn build3. Run appropriate test dapp locally
integrations/wagmiorplayground/legacy-evm-react-vite-playgroundusingyarn dev --host4. In the mobile repo, update
appwright/appwright.config.tsfor themm-connect-android-localentry5. You will need a prefined SRP android build. You can find one here.
6. Add entry for
E2E_PASSWORDin.js.envand source it withsource .js.env. You can get the password from someone in slack.7. Determine which
appwright/tests/mm-connect/connection-*.spec.jsyou want to run8. Update the dapp url constant to use10.0.2.2for the host9. Ensure the other tests in the suite are marked
.skip10.
yarn appwright test --project mm-connect-android-local --config appwright/appwright.config.ts11. Note that you will need to reset the browser state to be on a new tab page between every run
Browerstack build:
bs://e8d331895fc40982210e32d12db75489196b05ecScreenshots/Recordings
WAGMI Test Dapp
Screen.Recording.2026-01-07.at.1.44.54.PM.mov
EVM Legacy Test Dapp
Screen.Recording.2026-01-07.at.1.53.41.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Introduces automated Android E2E coverage for MM Connect flows using Appwright.
connection-evm.spec.js,connection-wagmi.spec.js, and updatesconnection-multichain.spec.jsAppwrightHelpers(native/webview context switching),tapByCoordinates, updated selectors; refactorsutils/MobileBrowser.jsand adds refresh/navigation helpersMultiChainEvmTestDapp,WagmiTestDapp,AddChainModal,SignModal,SwitchChainModal, enhancedDappConnectionModal, and Chrome menu/refresh inMobileBrowser--allow-insecure=chromedriver_autodownloadand set capabilitiesincludeSafariInWebviewsandchromedriverAutodownloadappium-adb,appium-chromium-driver,@playwright/test; update depcheck ignores and Podfile lock forreact-native-keyboard-controllerWritten by Cursor Bugbot for commit a9c0340. This will update automatically on new commits. Configure here.