test: add ids to wagmi test dapp elements#96
Merged
Conversation
7 tasks
adonesky1
approved these changes
Jan 7, 2026
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Jan 23, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **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#96 ## **Manual testing steps** ~~1. Pull https://github.com/MetaMask/connect-monorepo 2. `yarn && yarn build` 3. Run appropriate test dapp locally `integrations/wagmi` or `playground/legacy-evm-react-vite-playground` using `yarn dev --host`~~ 4. In the mobile repo, update `appwright/appwright.config.ts` for the `mm-connect-android-local` entry 5. You will need a prefined SRP android build. You can find one **[here](https://app.bitrise.io/build/2f2254fc-34bf-4291-bbb5-d525aa01d717?tab=artifacts)**. 6. Add entry for `E2E_PASSWORD` in `.js.env` and source it with `source .js.env`. You can get the password from someone in slack. 7. Determine which `appwright/tests/mm-connect/connection-*.spec.js` you want to run ~~8. Update the dapp url constant to use `10.0.2.2` for the host~~ 9. Ensure the other tests in the suite are marked `.skip` 10. `yarn appwright test --project mm-connect-android-local --config appwright/appwright.config.ts` 11. Note that you will need to reset the browser state to be on a new tab page between every run Browerstack build: `bs://e8d331895fc40982210e32d12db75489196b05ec` ## **Screenshots/Recordings** **WAGMI Test Dapp** https://github.com/user-attachments/assets/5b11bf49-d7f7-4e51-b23d-1c4d903a041d **EVM Legacy Test Dapp** https://github.com/user-attachments/assets/d0aac9b7-8a29-4150-acb2-4b5fa780cfdb ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces automated Android E2E coverage for MM Connect flows using Appwright. > > - Adds tests: `connection-evm.spec.js`, `connection-wagmi.spec.js`, and updates `connection-multichain.spec.js` > - New utilities: `AppwrightHelpers` (native/webview context switching), `tapByCoordinates`, updated selectors; refactors `utils/MobileBrowser.js` and adds refresh/navigation helpers > - New/expanded screen objects: `MultiChainEvmTestDapp`, `WagmiTestDapp`, `AddChainModal`, `SignModal`, `SwitchChainModal`, enhanced `DappConnectionModal`, and Chrome menu/refresh in `MobileBrowser` > - Patches appwright to start Appium with `--allow-insecure=chromedriver_autodownload` and set capabilities `includeSafariInWebviews` and `chromedriverAutodownload` > - Dependency updates: add `appium-adb`, `appium-chromium-driver`, `@playwright/test`; update depcheck ignores and Podfile lock for `react-native-keyboard-controller` > - README fixes for flows import paths > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a9c0340. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Christopher Ferreira <christopher.ferreira@consensys.net> Co-authored-by: Curtis David <Curtis.David7@gmail.com> Co-authored-by: ffmcgee <joao.carlos@consensys.net> Co-authored-by: Alex Donesky <adonesky@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Adds ids to the Wagmi test dapp elements so that they are easier to target in e2e tests
References
See: MetaMask/metamask-mobile#21978
Checklist