/defi-ui-testing:defi-ui-test-patternsfrom defi-ui-testing
This skill should be used when designing DeFi UI E2E test cases — connect wallet, token approve, swap, lend/borrow, health factor, liquidation, and multi-account journeys for mock or Synpress.
Ships in defi-ui-testing. 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.
Scenario catalog usable with Method A (mock) or Method B (Synpress). Replace wallet.* with fixture or MetaMask calls.
| Step | Assert |
|---|---|
| Open app | App loads, Connect visible |
| Connect | Address shown, disconnect available |
| Wrong network | Switch network CTA / auto prompt |
| Reject connect | Error toast / idle state (Method A connectError, Method B cancel) |
| Step | Assert |
|---|---|
| Select asset + amount | Preview rates |
| Approve | Method B: MetaMask permission; Method A: mock confirm |
| Allowance UI | Button becomes Supply/Swap |
| Action tx | Success UI + balance change |
| Reject approve | Stays unauthorized |
connect → select pair → enter amount → (approve if needed) → swap → success
Assert: input debit, output credit, price impact warning, failed path on slippage.
Borrower journey:
Cross-layer checks:
publicClient.readContract for positions| Actor | Actions |
|---|---|
| Borrower | Deposit, borrow near max |
| Test harness | Drop collateral price / raise debt (oracle mock, Anvil storage, time) |
| UI | Position shows liquidatable |
| Liquidator | Switch account, liquidate, confirm |
| Assert | Borrower HF improves or position closed; liquidator receives bonus |
Method A: wallet.connect('bob') after scenario setup.
Method B: metamask.switchAccount / second imported key.
confirmSignature / Method A mock features)// Prefer test ids
page.getByTestId('deposit-button')
// Assert UI + chain
await expect(page.getByTestId('success')).toBeVisible()
expect(await getSupplyBalance(address)).toBeGreaterThan(0n)
// Avoid fixed sleep; poll expectations
await expect(page.getByTestId('hf')).toHaveText(/1\.\d+/)
| Directory | Method | Gate |
|---|---|---|
e2e-mock/ | A | Required CI |
e2e-synpress/ | B | Nightly / workflow_dispatch |
Share scenario names and page-object business methods so both suites exercise the same product paths.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/defi-ui-anvil-fixturesThis skill should be used when building Anvil-backed Playwright fixtures for DeFi UI tests — snapshots, time travel, mining, impersonation, and multi-account chain helpers./defi-ui-mock-connectorThis skill should be used when implementing DeFi UI E2E with Playwright, Anvil, and Wagmi mock connector — window._setupAccount, fixtures, error features, without MetaMask extension./defi-ui-synpress-metamaskThis skill should be used when implementing DeFi UI E2E with Synpress, Playwright, MetaMask, and Hardhat/Anvil — wallet setup cache, connect, approve, deposit/borrow/liquidate flows./defi-ui-testing-overviewThis skill should be used when planning or implementing DeFi UI E2E tests — choosing between Wagmi mock connector vs Synpress MetaMask, stack layout with Anvil, and test strategy for dApps.defi-ui-testing@cyotee is listed by cyotee/cyotee-claude-plugins — review the source before installing
npx claudepluginhub cyotee/cyotee-claude-plugins --plugin defi-ui-testing