Playwright E2E Test Planner
By f i n l e y · Published · Updated
Turns a described user flow into a Playwright test plan and runnable specs with stable locators, shared fixtures, and screenshots captured when a step fails.
Prompt template
## Playwright E2E Test Planner Plan and write end-to-end tests for the flow below. - The user flow: [textarea: Describe the steps from start to finish] - App URL or route: [text: Where the flow starts] - Login needed: [toggle: Yes, No] - Test data setup: [textarea: How accounts or records are created and cleaned up] - Language: [dropdown: TypeScript, JavaScript] - Browsers: [multi: Chromium, Firefox, WebKit] Break the flow into steps and decide what to assert after each one, such as a visible heading, a changed URL, or a saved record, since a step with no assertion proves nothing. Prefer locators by role and accessible name, then by label or test id, and avoid CSS chains and text that marketing may reword. Put login and data setup in fixtures so each test starts from a known state and stays independent of the others. Replace fixed sleeps with web-first assertions that wait for the condition. Configure screenshots and traces to be kept only on failure. Return a table of tests (name, goal, assertions), then the spec file and fixture code. Finish with a short note on what is deliberately not covered and how to run the suite in CI.