add-e2e-test

add-e2e-test is a command for coding agents from mentilead/shopify-app-skill. It costs 0 tokens per session (537 once invoked), scanned A, original, MIT.

A coding command for creating an automated browser test with Playwright, a tool that drives a real browser. It chooses a test level and, for embedded Shopify apps, looks inside the app’s iframe, the browser frame containing the app.

In plain words
What is it for?
Use it to test a form editor, billing upgrade flow, settings changes, service logic, or other Shopify app behavior.
Why use it?
It removes repeated setup for testing app pages and interactions in the right place. It helps avoid selectors that fail because an embedded app is inside an iframe.

Command

Part of the shopify-app-skill plugin — 1 skill, 10 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mentilead/shopify-app-skill/add-e2e-test
Clone the repo
git clone --depth 1 https://github.com/mentilead/shopify-app-skill

Or install shopify-app-skill, the plugin that ships this one along with the rest of its 1 skill, 10 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-e2e-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/mentilead/shopify-app-skill/add-e2e-test.svg)](https://agentmods.dev/commands/mentilead/shopify-app-skill/add-e2e-test)
Your own site
<a href="https://agentmods.dev/commands/mentilead/shopify-app-skill/add-e2e-test"><img src="https://agentmods.dev/badge/commands/mentilead/shopify-app-skill/add-e2e-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 537 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00537
Opus 5 $0.00000 $0.00269
Sonnet 5 $0.00000 $0.00107
Haiku 4.5 $0.00000 $0.00054

Measured 4d ago against content hash b4d510fe9b48, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-e2e-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/add-e2e-test.md · 40 lines

How it starts

The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add E2E Test

Scaffold a Playwright end-to-end test with FrameLocator for embedded Shopify app testing.

Arguments

$ARGUMENTS = feature or page to test (e.g., "form editor page", "billing upgrade flow", "settings CRUD")

Instructions

  1. Parse the test target from $ARGUMENTS. If empty, ask the user what feature or page to test.
  2. Read .claude/skills/shopify-app/references/testing-patterns.md for the three-tier strategy, FrameLocator pattern, and auth setup.
  3. Determine which test tier is appropriate:
    • Unit (Vitest) — for service function logic, key builders, mappers
    • Mock-bridge CI (Playwright + mock) — for UI flows without Shopify auth
    • E2E (Playwright) — for full embedded app flows inside Shopify admin
  4. Create the test file in the correct location:
    • Unit tests: tests/unit/<feature>.test.ts
    • E2E tests: tests/e2e/<feature>.spec.ts
  5. For E2E tests, use the FrameLocator pattern:
    • Import helpers: getAppFrame, navigateToApp, waitForPageTitle
    • All selectors go through frame.getByRole(), frame.getByText(), etc.
    • Never use page.locator() directly — the app runs in an iframe
  6. Structure the test with:
    • test.describe block for the feature
    • test.beforeEach for navigation and setup
    • Individual test blocks for each scenario (happy path, error cases, edge cases)
    • Assertions using expect with appropriate matchers
  7. For tests that need authenticated state:
    • Use the auth setup from the test helpers (cookie-based or token-based)
    • Handle the Shopify admin login flow if testing full E2E
  8. For tests that modify data:
    • Clean up created data in test.afterEach or use unique identifiers per run
    • Consider test isolation (each test should work independently)
  9. Add the test to the appropriate CI config if it's a unit or mock-bridge test.
  10. Remind the user to:
    • Run unit tests: npm test or npx vitest
    • Run E2E tests locally: npx playwright test (requires shopify app dev running)
    • E2E tests don't run in CI — they require a live Shopify dev store

Read the full file on GitHub · 40 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 40 lines · 0 tokens per session scan A b4d510fe9b48

Subscribe to this mod's changes

add-e2e-test is a command published in the GitHub repository mentilead/shopify-app-skill (5 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 537 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.