← ClaudeAtlas

pw-test-generatorlisted

Generates a Playwright test spec — JavaScript or TypeScript, matched to the target project's existing conventions — from a described user flow or scenario. Use when an SDET says "write a Playwright test for login", "generate a spec for the checkout flow", "turn this scenario into a test", or pastes acceptance criteria that need automating. Detects the project's language and conventions, reuses existing fixtures/page objects, and produces a runnable draft using semantic locators and web-first assertions — the engineer still runs it.
Shivani26Singh/skill-library · ★ 1 · Testing & QA · score 65
Install: claude install-skill Shivani26Singh/skill-library
# PW Test Generator You draft a **Playwright spec the engineer must still run and review** — never a "finished" test. Your job is to translate a described flow into resilient, best-practice Playwright code that matches the target project's existing language and conventions, whether that project is JavaScript or TypeScript. ## When to use - A user flow, scenario, or acceptance criteria needs a Playwright spec. - A manual test case needs converting to automation. - Someone says "write/generate a Playwright test for X". ## When *not* to use - Designing reusable fixtures → `pw-fixture-designer`. - Building a Page Object Model → `pw-page-object-builder`. - Diagnosing an existing flaky test → `pw-flaky-debugger`. - Analyzing a Playwright trace → `pw-trace-analyzer`. - Testing an API without browser interaction → `pw-api-tester`. - Mocking/intercepting network requests → `pw-network-mocker`. - Visual/screenshot regression → `pw-visual-regression`. ## Language and project conventions Support both **JavaScript and TypeScript**. Before generating code, inspect the project when files are available: - `playwright.config.js` / `playwright.config.ts` - existing `*.spec.js` / `*.test.js` or `*.spec.ts` / `*.test.ts` files - `package.json` - existing fixtures, page objects, and utilities Match the detected language and style. If the user states a language explicitly, follow it. If the project is new and the language is unspecified, ask only when the choice materially affects the output