/synpress:synpress-playwrightfrom synpress
This skill should be used when writing Playwright tests with Synpress — testWithSynpress, metaMaskFixtures, connecting dApps, confirming txs, and page objects with MetaMask.
Ships in synpress. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
// tests/e2e/lending.spec.ts
import { testWithSynpress } from '@synthetixio/synpress'
import { MetaMask, metaMaskFixtures } from '@synthetixio/synpress/playwright'
import basicSetup from '../../wallet-setup/metamask.setup'
const test = testWithSynpress(metaMaskFixtures(basicSetup))
const { expect } = test
test.describe('Lending Protocol', () => {
test('connect wallet', async ({ context, page, metamaskPage, extensionId }) => {
const metamask = new MetaMask(
context,
metamaskPage,
basicSetup.walletPassword,
extensionId
)
await page.goto('/')
await page.getByRole('button', { name: /Connect Wallet/i }).click()
await metamask.connectToDapp()
await expect(page.getByText(/0xf39F/i)).toBeVisible()
})
})
Some Synpress versions expose a ready metamask fixture from metaMaskFixtures — prefer the fixture when available to avoid manual construction.
// pages/lending.page.ts
import type { Page, Locator } from '@playwright/test'
import type { MetaMask } from '@synthetixio/synpress/playwright'
export class LendingPage {
readonly connectWalletButton: Locator
readonly depositButton: Locator
constructor(
private page: Page,
private metamask: MetaMask
) {
this.connectWalletButton = page.getByRole('button', { name: /Connect Wallet/i })
this.depositButton = page.getByTestId('deposit-button')
}
async connectWallet() {
await this.connectWalletButton.click()
await this.metamask.connectToDapp()
}
async depositAndConfirm() {
await this.depositButton.click()
await this.metamask.confirmTransaction()
}
async approveTokenIfPrompted() {
await this.metamask.approveTokenPermission({ spendLimit: 'max' })
}
}
// Connect
await page.getByRole('button', { name: /Connect/i }).click()
await metamask.connectToDapp()
// Send tx
await page.getByTestId('swap-button').click()
await metamask.confirmTransaction()
// Reject tx (negative path)
await page.getByTestId('swap-button').click()
await metamask.rejectTransaction()
// Token allowance (ERC-20 approve)
await metamask.approveTokenPermission({ spendLimit: 'max' })
// NFTs: use confirmTransaction() instead
// Switch account (dApp must listen to accountsChanged)
await metamask.switchAccount('Account 2')
// Network
await metamask.approveSwitchNetwork()
Extension UI is a separate page. To attach both dApp and popup:
const popupPromise = context.waitForEvent('page')
await page.getByTestId('swap-button').click()
const popup = await popupPromise
await popup.screenshot({ path: 'mm-popup.png' })
await page.screenshot({ path: 'dapp.png' })
// Optional: merge with sharp, then testInfo.attach(...)
npx synpress wallet-setup # first time / setup changed
npx playwright test
npx playwright test --headed
getByRole / getByTestId on the dApp; let Synpress own extension selectorsworkers modest until wallet cache is proven stable in CIWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
synpress@cyotee is listed by cyotee/cyotee-claude-plugins — review the source before installing
npx claudepluginhub cyotee/cyotee-claude-plugins --plugin synpress4 skills in this plugin
/synpress-metamask-apiThis skill should be used when calling Synpress MetaMask API methods — connectToDapp, confirmTransaction, approveTokenPermission, switchNetwork, signatures, and account import./synpress-overviewThis skill should be used when the user asks about "Synpress", "@synthetixio/synpress", Web3 E2E with MetaMask extension, or wallet-cache setup for Playwright/Cypress dApp tests./synpress-wallet-setupThis skill should be used when configuring Synpress wallet-setup — defineWalletSetup, MetaMask seed/password, wallet-setup cache, and Anvil/Hardhat test accounts.