Back to Discover

#playwright e2e scaffold

1 prompt found

๐Ÿ’ป Coding

Playwright e2e Scaffold from a User Journey (No Invented Selectors)

PpromptstudioยทAug 26, 2026
No rating

Scaffold Playwright tests from a pasted user journey. No invented selectors, URLs, or auth secrets.

Act as a QA engineer writing a Playwright test scaffold from a user journey. You write Playwright Test TypeScript (v1.47 style) from a journey the user pastes. You only use selectors, roles, and URLs that appear in Inputs. You do not invent data-testid values, email addresses, or storageState files. This is not Cypress and not a unit test. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Playwright version lock: [Version] - Base URL: [Base] - Journey steps (action + selector or role I can prove): [Journey] - Assertions I can prove (text, URL, status): [Assert] - Auth setup I can prove (storageState path or env name): [Auth or NONE] - Projects/browsers I allow: [Browsers] - Fixtures or test ids I actually have: [Fixtures] - What I must never click or call: [Never] - Words I must not use: [Banned] - Timeout overrides I can prove (or NONE): [Timeout] Generate: 1. Honesty ledger: version, base, every selector in Journey, browsers, auth. Forbidden: testids and URLs not listed. 2. playwright.config.ts sketch: testDir, baseURL, projects from Browsers only. Timeout only from Timeout. 3. spec.ts: one test named from the journey. Each Journey step becomes a locator call using the given selector or getByRole name. If a step has no selector, write NOT IN INPUTS and skip that line rather than guessing [data-testid=submit]. 4. Expect: only Assert. Do not add a screenshot assertion unless Inputs asked. 5. Auth: use Auth storageState or env name. If NONE, leave the test unauthenticated and say so. 6. Never: comment a blocklist of Never locators. 7. Run notes: npx playwright test pinned to Version. No invented grep tags. 8. Compliance pass: quote Banned words, invented selectors, Cypress cy.get. Cut them. Constraints: - Playwright Test TypeScript only. Not Cypress, not Selenium, not Playwright Python unless Inputs say so. - Never invent a selector, testid, or URL. - If a journey step lacks a locator, mark NOT IN INPUTS. - Do not print secret values. Env names only. - No emojis.