You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: MMQA-1995: Migrate smoke/networks Detox tests to Appium (#32804)
## **Description**
Migrates the Detox smoke tests in `tests/smoke/networks/` to Playwright
+ Appium equivalents under `tests/smoke-appium/networks/`, and removes
the duplicate Detox specs once parity is achieved.
**Motivation:** Continue the incremental Detox → Appium migration so
network smoke coverage runs in the Appium CI pipeline on both Android
and iOS.
**Key changes:**
- Add Appium smoke specs for `SmokeNetworkAbstractions`
(`network-manager2`) and `SmokeWalletPlatform`
(`homepage-sections-network-filter`)
- Add Appium smoke CI jobs for both tags on Android and iOS
(`appium-network-abstractions-*`, `appium-wallet-platform-*`)
- Extend shared E2E framework for Android Appium browser flows: URL bar
navigation, native accessibility for test-dapp network picker
interactions, Playwright label assertions, and browser tab grid handling
- Remove migrated Detox specs from `tests/smoke/networks/`
### Migrated specs
| Former Detox spec | Appium spec | Smoke tag |
|---|---|---|
| `tests/smoke/networks/network-manager2.spec.ts` |
`tests/smoke-appium/networks/network-manager2.spec.ts` |
`SmokeNetworkAbstractions` |
| `tests/smoke/networks/homepage-sections-network-filter.spec.ts` |
`tests/smoke-appium/networks/homepage-sections-network-filter.spec.ts` |
`SmokeWalletPlatform` |
### Test coverage (unchanged scenarios)
**SmokeNetworkAbstractions — Network Manager**
- Preserves existing enabled networks when adding a network via dapp
**SmokeWalletPlatform — Homepage Tokens Section - Network Filter**
- Navigates from homepage tokens section to tokens full view
- Filters tokens by selected network in tokens full view
- Shows all tokens on homepage regardless of network filter set in
tokens full view
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Refs: MMQA-1995
## **Manual testing steps**
```gherkin
Feature: Networks smoke Appium migration
Scenario: network-manager2 preserves enabled networks when adding via dapp (Android)
Given the Appium smoke Android environment is set up with a running emulator
When I run the network-manager2 Appium smoke spec
Then the test passes end-to-end including dapp network picker, connect modal, and wallet network verification
Scenario: homepage-sections-network-filter smoke scenarios (Android)
Given the Appium smoke Android environment is set up with a running emulator
When I run the homepage-sections-network-filter Appium smoke spec
Then all three scenarios pass: navigation to tokens full view, network filter in full view, and homepage tokens unaffected by full-view filter
```
Local Android commands:
```bash
CI=true ANDROID_DEVICE_UDID=emulator-5554 SKIP_DEVICE_BOOT=true \
yarn appium-smoke:android -- tests/smoke-appium/networks/network-manager2.spec.ts
CI=true ANDROID_DEVICE_UDID=emulator-5554 SKIP_DEVICE_BOOT=true \
yarn appium-smoke:android -- tests/smoke-appium/networks/homepage-sections-network-filter.spec.ts
```
## **Screenshots/Recordings**
N/A — test infrastructure and E2E migration only; no UI/product changes.
### **Before**
N/A
### **After**
N/A
## **Pre-merge author checklist**
- [x] 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).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] 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.
#### Performance checks (if applicable)
N/A — E2E test migration only.
## **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]
> **Low Risk**
> Test and CI workflow changes only; no production app logic. Shared
page objects and framework code affect both Detox and Appium paths, so
regressions would surface in E2E rather than user-facing behavior.
>
> **Overview**
> Moves **`tests/smoke/networks/`** network smoke coverage to
**`tests/smoke-appium/networks/`** and deletes the Detox specs once
Appium parity exists. **CI** gains Android/iOS Appium jobs for
**`SmokeNetworkAbstractions`** and **`SmokeWalletPlatform`**.
>
> Shared E2E helpers are extended for Appium browser and wallet flows:
HTTP URL-bar navigation vs **`dapp://`** deeplinks, tab-grid and URL-bar
visibility, native connect/label assertions, webview selection for
localhost dapps, fixture-wide dapp port rewriting, and
wallet/network-manager navigation (tokens section scroll, network
manager readiness).
>
> Specs switch to Playwright fixtures and **`loginToAppPlaywright`**;
default API mocks add an empty notifications POST. Detox
**`navigateToURL`** still uses replace + submit with optional URL-editor
dismiss; Appium test-dapp load checks the native URL bar instead of
webview fox logo.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d2a9bb5. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: javiergarciavera <javiergarciavera@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments