# Prompt template — generate a Playwright test from a scenario card Paste this into Claude Code (from the repo root), filling in the card id. Claude has the repo in context, so it will read the card and the conventions itself. --- Generate the automated test for scenario card `qa/scenarios/.yml`. Follow `e2e/CLAUDE.md` exactly. In particular: - Put the test in the spec file for the card's `area`; add to the existing `test.describe` block, do not create a new spec. - Drive the UI only through the page objects in `e2e/pages/`. If a needed action or locator is missing, add a method to the right page object and use it. - Import `test`/`expect` from `../fixtures/test`; take accounts from `e2e/fixtures/accounts.ts`. - For every clause under the card's `then:` and every item under `evidence:`, add an `evidence.step(name, { ...observed data })` capturing a screenshot and the figures the card asks for. - No raw selectors in the spec, no `waitForTimeout`, no hardcoded secrets. - If the test creates data (a booking), clean it up at the end. When done: 1. Show me the diff (the spec, and any page-object change). 2. Run it: `.\run-tests.ps1 -Layer -Grep "" -Open`. 3. Confirm the evidence report shows each screenshot and the API request/response listed in the card's `evidence:` section. Do not loosen any assertion to make it pass. If the application behaves differently from the card, stop and tell me what differs — that is a finding, not something to code around. --- ## Reviewer checklist (the human reading the diff) - [ ] Test lives in the right area spec; uses page objects, no raw selectors. - [ ] Every `then` has a matching assertion on observable state. - [ ] Evidence steps cover everything the card listed. - [ ] No `waitForTimeout`, no hardcoded credentials, no weakened assertions. - [ ] It actually ran green, and the evidence report proves the scenario. - [ ] Data created by the test is cleaned up.