Skip to content

fix: MetaMask 13.40 network picker selector updates - #94

Merged
Maksandre merged 3 commits into
mainfrom
fix/e2e-metamask-network-picker
Jul 21, 2026
Merged

fix: MetaMask 13.40 network picker selector updates#94
Maksandre merged 3 commits into
mainfrom
fix/e2e-metamask-network-picker

Conversation

@Maksandre

@Maksandre Maksandre commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Nightly Playwright runs went red after MetaMask shipped 13.40, which replaced the Default/Custom tabbed network menu with a unified "Select network" modal.

Previously red tests (scheduled runs on main):

  • Metamask: inside › Can connect to existing network — picker button now reads Network: <name>, so the exact-text assertion failed
  • Metamask: inside › Can connect to existing testnet — the Custom tab no longer exists
  • Metamask: inside › Can add a custom network and an existing network — same missing Custom tab

Root cause

MetaMask 13.40 merged Popular/Custom tabs into one list where every network row carries its display name as data-testid, and the picker button label gained a Network: prefix.

Fix

  • switchNetwork: removed the tab click, selects networks by name testid in the unified modal, asserts with toContainText. The networkType parameter is deprecated and ignored (kept for backward compatibility).
  • Tests: addCustomNetwork now targets the local anvil node (http://localhost:8545, chain 31337) instead of rpc-campnetwork.xyz. MetaMask 13.40 validates the RPC (fetches its chain ID) before enabling Save, and that external RPC was returning 503 — local anvil makes the tests hermetic.
  • Docs: updated skills/w3wallets references for the deprecated parameter.
  • Version: 1.0.0-beta.111.0.0-beta.12.

Test plan

  • All 3 previously-red tests pass locally against MetaMask 13.40
  • Full local suite green (remaining occasional local-only erc20 flakes are pre-existing cold-start timeouts, pass on rerun and in CI)
  • CI green

🤖 Generated with Claude Code

MetaMask 13.40 replaced the Default/Custom tabbed network menu with a
unified 'Select network' modal:

- switchNetwork: drop the removed 'Custom' tab click; select networks
  by their name data-testid in the unified list; assert via
  toContainText since the picker button now reads 'Network: <name>'.
  The networkType parameter is deprecated and ignored.
- tests: point addCustomNetwork at the local anvil node instead of
  rpc-campnetwork.xyz — MetaMask now validates the RPC (fetches chain
  ID) before enabling Save, so external RPC downtime broke the tests.
- docs: update w3wallets skill references for the deprecated parameter.
The deprecated _networkType parameter in switchNetwork is intentionally
unused; allow the standard ^_ convention.
@Maksandre
Maksandre merged commit 64f58b2 into main Jul 21, 2026
3 checks passed
@Maksandre
Maksandre deleted the fix/e2e-metamask-network-picker branch July 21, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant