# Playwright E2E Tests: Signup, Stripe Checkout, Auth Flows

> Finds which money and account flows have no end-to-end test, then builds the test data layer and Playwright specs for them: signup, verification, login, reset, Stripe test-mode checkout with webhooks, onboarding, admin gates and account deletion.

Playwright E2E Tests: Signup, Stripe Checkout, Auth Flows is a paid AI agent skill on Agensi by Nate Freed, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Nate Freed](https://www.agensi.io/creators/nate-freed)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/playwright-e2e-tests-signup-stripe-checkout-auth-flows
- Tags: testing-debugging, frontend-web-apps, security

## About this skill

Most Playwright suites test the easy pages and skip the flows that cost money when they break. This skill starts from the repo you already have. A static scan maps your routes (Next.js, React Router, Express, Hono, Fastify, Cloudflare Pages Functions) to your existing specs and prints a coverage table ranked by risk, so the untested checkout webhook or account deletion shows up first. Skipped or fixme tests, specs outside your testDir and visits to a remote staging URL do not count as coverage. A linter with 23 checks flags what makes critical tests blind or dangerous, with file:line and a fix for each: sleeps, committed .only, missing awaits, brittle selectors, shared state, tests with no assertions, live Stripe keys, real email domains, and seed routes that production can reach (including token-minting test routes and test flags left on in wrangler.toml). Then it builds the hard part, which is test data. You get a test-only seed and reset API that refuses to run unless an explicit flag, a non-production environment and a per-run token are all present, with no fallback secrets, plus Express, Next.js and Hono (Workers) adapters and a ready Prisma store. On top of that come per-role storageState sessions, a unique user per test with automatic cleanup, email links captured from an outbox, and state polling instead of sleeps. Six spec templates cover the flows. Stripe runs in test mode only: signed webhook tests run offline, and an optional hosted tier uses the published test cards, including 3-D Secure.

## Requires

- Python 3.8+ (standard library only)
- A JS/TS web app repository
- @playwright/test to run the specs
- Playwright
- Node.js
- prisma
- Wrangler
- Optional: Stripe test-mode keys (hosted tier)
- Optional: Stripe CLI, run by you (hosted tier)
- Optional: Chromium installed by Playwright

## Known limitations

Static heuristics: flow_map classifies routes by keywords and counts a flow as covered when a running spec hits one of its routes, which says nothing about assertion quality. It reads testDir but not testIgnore or testMatch, and only unconditional skips. Routers outside Next.js, React Router, Express, Hono, Fastify and Pages Functions (SvelteKit, Remix flat routes, Rails) are not mapped. lint_e2e reads source text, not types, so missing-await and shared-state findings must be confirmed at the line. Templates need adapting to each app's labels and data model (marked ADAPT). The Hono adapter was type-checked against Hono's API shape, not run. Hosted Stripe Checkout locators target markup Stripe controls and may need a one-file update. Offline webhook tests cannot satisfy handlers that re-fetch objects from the Stripe API.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Playwright E2E Tests: Signup, Stripe Checkout, Auth Flows skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Is it safe to add a seed/reset API to my app?

The template fails closed. It mounts nothing unless E2E_TEST_API=1, NODE_ENV is not production (and no platform variable says production), and a 24+ character per-run token is set. Every request must present that token, otherwise it gets a 404. It only touches accounts on a reserved test domain, never mints session tokens and has no fallback secrets. lint_e2e checks the guard.

### Do I need a Stripe account or network access to test checkout?

No, not for the default tier. Specs sign Stripe-shaped webhook events with a per-run secret and post them to your own webhook route, then check stored state and the UI, all offline. The optional hosted tier uses your test-mode keys, Stripe's published test cards (4242, decline, 3-D Secure) and stripe listen, which you run yourself. Live keys stop the run.

### How is this different from a flaky-test fixer?

It doesn't triage flakes. It decides what must be tested: the signup, billing and account flows ranked by risk. Then it builds the test data layer those flows need (seeded users per role, unique users per test, email outbox, webhook signing) and writes the specs. The lint focuses on what makes those tests unsafe or unable to fail.

### Which stacks does the coverage map understand?

Next.js app/ and pages/ routes (including the Auth.js catch-all), React Router (JSX and object routes, nested children), Express, Hono and Fastify routers with their mount prefixes, and Cloudflare Pages Functions file routes. Playwright specs are found from playwright.config testDir or their @playwright/test import. You can add your own flow keywords with --flows.

### Does it read my .env files?

Not by default. The agent never opens them, and both scripts skip them. If you agree, lint_e2e --env-key-check looks only for a live Stripe key prefix and reports the variable name, never the value. When you run the suite, the config template refuses to start if an env file next to it holds a live key.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
