fix: MetaMask 13.40 network picker selector updates - #94
Merged
Conversation
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.
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.
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 readsNetwork: <name>, so the exact-text assertion failedMetamask: inside › Can connect to existing testnet— theCustomtab no longer existsMetamask: inside › Can add a custom network and an existing network— same missingCustomtabRoot 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 aNetwork:prefix.Fix
switchNetwork: removed the tab click, selects networks by name testid in the unified modal, asserts withtoContainText. ThenetworkTypeparameter is deprecated and ignored (kept for backward compatibility).addCustomNetworknow targets the local anvil node (http://localhost:8545, chain 31337) instead ofrpc-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.skills/w3walletsreferences for the deprecated parameter.1.0.0-beta.11→1.0.0-beta.12.Test plan
🤖 Generated with Claude Code