Skip to content

test: add ids to wagmi test dapp elements#96

Merged
adonesky1 merged 7 commits intomainfrom
jl/update-wagmi-test-dapp-ids
Jan 7, 2026
Merged

test: add ids to wagmi test dapp elements#96
adonesky1 merged 7 commits intomainfrom
jl/update-wagmi-test-dapp-ids

Conversation

@jiexi
Copy link
Copy Markdown
Member

@jiexi jiexi commented Jan 7, 2026

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

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@jiexi jiexi requested a review from a team as a code owner January 7, 2026 21:58
@jiexi jiexi changed the title jl/update wagmi test dapp ids test: add ids to wagmi test dapp elements Jan 7, 2026
@adonesky1 adonesky1 merged commit 6352385 into main Jan 7, 2026
42 checks passed
@adonesky1 adonesky1 deleted the jl/update-wagmi-test-dapp-ids branch January 7, 2026 22:09
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants