Code
Write end-to-end tests
Playwright specs for the journeys that actually matter, that do not flake.
Fill it in
What to test.
What must never break.
Roles and test ids, never CSS paths.
Your prompt
Write end-to-end tests for [the site]. Journeys: [the journeys] Explore it first and write down the actual flow, including the redirects, the consent banner and the thing that only appears the second time. A spec written from an assumed flow fails on run one for reasons that have nothing to do with the product. Select by role and accessible name, or by an explicit test id. Never by CSS path: those break on every restyle, and a suite that fails for cosmetic reasons gets turned off within a month. Wait for STATE, never for time. A `waitForTimeout` is a flaky test with a delay, and it is the single biggest source of intermittent CI failures. Each spec sets up and cleans up its own data, so it can run alone and in parallel.
Use Write end-to-end testsOpens with everything above already filled in.
Why this works
A suite that fails for cosmetic reasons gets turned off within a month, so this selects by role and test id rather than CSS path. It waits for state rather than time, which is the single biggest source of intermittent CI failures.