Playwright E2E Tests: Signup, Stripe Checkout, Auth Flows
by Nate Freed
Most Playwright suites test the easy pages and skip the flows that cost money when they break.
$5
Playwright E2E Tests: Signup, Stripe Checkout, Auth Flows
Example session with this skill installed
We're launching paid plans next week (Next.js App Router, Stripe hosted Checkout, Prisma). Our Playwright suite only checks the pricing page and login. Add E2E tests for the flows that matter and tell me what's untested.
- Read your context and instructions
- Compiled the playwright e2e tests
Critical-flow E2E: invoicely (Next.js, Stripe hosted Checkout)
Before: 31 routes, 2 specs / 3 tests
#1 Payment webhooks GAP: POST /api/webhooks/stripe. Checkout specs abort the redirect, so nothing checks the state a webhook sets
#2 Signup GAP | #3 Account deletion GAP | #4 Password reset GAP | #5 Admin (page + API) GAP | #6 Email verification GAP | #7 Subscription mgmt GAP | #8 Onboarding GAP
Checkout, Login: COVERED (page visits only)
Lint before: 11 findings (high 2, medium 7, low 2)
HIGH E2E011 app/api/dev/seed/route.ts: guarded only by NODE_ENV !== 'production' (open when NODE_ENV is unset), and it mints session tokens
HIGH E2E013 app/api/dev/seed/route.ts:8: JWT signed with a fallback secret
MED waitForTimeout(3000), nth-child selector, shared let token, a test email on a real domain, retries 3
Done with your OK: replaced the seed route with a guarded test API (flag + not production + per-run token, 404 otherwise; test-domain accounts only; it mints no tokens). Added config, per-role storageState setup, makeUser/freshUser fixtures and 6 flow specs (26 tests; 4 hosted-Stripe tests are opt-in).
Lint after: 0 findings. Flow map after: 9 of 10 flows COVERED.
Not covered yet: subscription management (portal, cancel), proposed next. 30 ADAPT markers still need checking against your components.
Next: npx playwright test e2e/specs/checkout.spec.ts (I'll start the dev server only once you say yes).
Connects securely to your tools. The creator never sees your data.
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.
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
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 6 days ago
- Accounts
Stripe
0
Microsoft
- Software
Python 3.8+ (standard library only)A JS/TS web app repository@playwright/test to run the specs
Playwright
Node.jsprismaWrangler
- Optional
- Stripe test-mode keys (hosted tier)Stripe CLI, run by you (hosted tier)Chromium installed by Playwright
Permissions
Allowed Hosts
File Scopes
Both scripts are offline and read-only, mask any key-like value they print, and do not open .env or key files. The one exception is lint_e2e --env-key-check, used only after the user agrees: it reports the variable name of a live Stripe key in .env files, never the value. Environment access is limited to checking STRIPE* values for live-key prefixes. Network: localhost and 127.0.0.1 for the app under test; checkout.stripe.com only in the opt-in hosted tier, in test mode; registry.npmjs.org and the Playwright browser CDN only if the user approves adding @playwright/test or downloading Chromium. The agent never runs Stripe CLI commands, pushes, enables CI or installs packages without an explicit yes.
What's inside
Frequently Asked Questions
New in Security
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.