Metamask extension testing

From cyotee/indexedex · View interactive version

Metamask extension testing is an AI agent skill from the GitHub repository cyotee/indexedex. This skill should be used when deciding how to test MetaMask integration — real extension automation vs mock provider, flaky UX, and CI constraints.

How to use this skill

Skill file

IndexedEx precedence (2026-10-19)

Current IndexedEx CLAUDE.md, product/testing law and the existing injected-wallet

Playwright framework take precedence over generic examples below. Use

frontend/apps/indexedex, not the older apps/dtf layout. Connector stubs are

isolated UI tests only, never replacements for real contract/money-path checks.

MetaMask automation is not enabled for this repository. Read the local

IndexedEx context for actual network, reset, fixture,

secret and signing/broadcast authorization rules before applying an example.

Source-version caveat (2026-10-19): archived source has no pinned upstream

revision; Synpress v4 examples are reference-only and not installed or executed.

The original MIT metadata is retained, but no original license file was found;

provenance records that gap and all port adaptations.

Testing with the MetaMask Extension

Real extension path

Reference tooling: Synpress + Playwright (Chromium) + cached wallet setup. Current IndexedEx guidance prohibits MetaMask automation; do not install or run this alternative. It describes coverage a future separately authorized compatibility check would need.

Pros

Cons

Mock provider path

Isolated UI tooling: Playwright + Wagmi mock connector. Distinguish this from IndexedEx e2e/wallet/injectWallet.ts, which signs real local transactions and forwards real contract reads.

Pros

Cons

Recommended matrix

| Suite | When | Stack |

|-------|------|-------|

| PR / local money paths | Existing required coverage | Playwright injected wallet + real contracts/RPC |

| Isolated connector UI | Explicit UI/error cases | Stub only, no money-path claim |

| Real-wallet compatibility | Separately authorized manual check | Human MetaMask + disposable Anvil identity; no extension automation |

Manual import of Anvil key (exploratory)

  1. Human operator confirms the authorized local deployment and imports only the known disposable Anvil #1 identity; do not start a generic node or use a funded personal wallet
  2. MetaMask → Import account → paste key
  3. Add network RPC http://127.0.0.1:8545, chain id 4663
  4. Connect dApp pointed at local RPC

Flakiness checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.