Verify for real: look at the page, not the code
Why: batches tested in jsdom and reviewed went live with overlapping buttons, spotted by eye in 10 minutes. jsdom does not compute layout; a green test is not a page that renders.
1. Target
- The commit's preview (Vercel READY) or prod once the real deployment is confirmed
(
ship-to-prod, step 4). - A dev server under the sandbox is often unusable (ports, file limits): prefer the preview; for
a local file (HTML, static build), a small Node server on
127.0.0.1started and stopped in the script.
2. Browser
playwright-core+chromium-headless-shellinstalled ONCE, in a durable folder (the temp folder empties itself):npm i --prefix <durable folder> playwright-corethennode <durable folder>/node_modules/playwright-core/cli.js install chromium-headless-shell. Always--prefix: without it, npm climbs to the firstnode_modulesit finds and uninstalls whatever is not in itspackage.json(it happened to us).- Flags tested under a macOS sandbox:
['--no-sandbox', '--disable-gpu', '--single-process', '--no-zygote', '--disable-software-rasterizer', '--disable-gpu-rasterization', '--disable-accelerated-2d-canvas'](the last 3 avoid a crash at GL initialization). - Behind a proxy: pass it to
chromium.launch({ proxy })fromHTTPS_PROXY(otherwiseERR_NAME_NOT_RESOLVED). - With
--single-process: neverbrowser.newContext(); onelaunchper width,browser.newPage({ viewport }); closing the page closes the browser. - Script output goes to a file, read while filtering out harmless system noise.
3. Test account
- The project's own, noted in its
CLAUDE.md(where to find the login, never the password in clear text). Never the user's account nor a real customer's. - No account noted: verify the public part, then ask the user one question, and record it in the
project's
CLAUDE.md. - What the test creates in prod is deleted at the end, leftover rows included (deleting an account does not remove a setting placed on its role).
4. Trigger the modified state
- Go all the way to the exact screen the diff changes (click, form, filter, empty case, error case, language), not just the home page.
5. Checks, at 412 px then at 1440 px
- 0 console errors:
page.on('console')of typeerror, andpage.on('pageerror'). - 0 4xx/5xx responses:
page.on('response'); an expected 401 or 404 is justified in one line. - 0 overflow at 412 px:
document.documentElement.scrollWidth - innerWidthequals 0; no button cut off, overlapping or hidden. - PNG screenshot of the modified state at each width, looked at (Read tool), one image at a time.
6. Report
- The screenshot paths and the three numbers: console errors, 4xx/5xx responses, overflow.
- What could not be seen: "not verifiable because ...", with the exact URL and what to look at.
What "done" looks like
- Screenshot of the modified state at 412 and 1440 px, looked at.
- 0 console errors, 0 4xx/5xx responses, 0 overflow at 412 px.
- Or the sentence "not verifiable because ..." with the URL and what to look at.