test: harden CHRNX visual evidence

This commit is contained in:
chrnx committed 2026-08-13 10:38:29 -05:00
1 parent 4e496b241a
commit 16b6a75b35
3 files changed
+386 -62

No files matched your search

+32 -8
View File
@@ -92,19 +92,43 @@ WebP sources, with the original source as a fallback.
Capture the approved local review routes with Chromium:
Create the ignored local override `.wp-env.override.json` so this checkout stays
isolated from the root environment:
```json
{
"port": 8908,
"testsPort": 8909
}
```
Then start WordPress, activate the theme, and seed the deterministic fixtures:
```sh
npm run env:start
npm run env:activate
./scripts/seed-test-content.sh
```
Capture only after those commands succeed:
```sh
CHRNX_REVIEW_URL=http://localhost:8908 node scripts/capture-visual-review.mjs
```
The capture script rejects public hosts and writes its screenshots to
`tmp/imagegen/`, which Git ignores. It captures the rendered Music and Podcasts
pages at 375, 768, 1440, and 2560 px in light and dark themes. The long-copy
Podcast state changes only the rendered latest-card title and excerpt; it does
not write to the database. Source masters remain authoritative, and responsive
media must be rebuilt with `scripts/build-responsive-images.sh` after any
approved source change. Treat these screenshots as disposable review evidence:
keep them uncommitted, obtain visual approval before committing this stage, and
do not begin the next visual task until that approval is recorded.
`tmp/imagegen/grunge-stage-review.png/`, which Git ignores. The directory's
`.png` suffix intentionally matches the existing review-artifact ignore rule;
the script builds all 24 files in a private staging directory, validates the
complete inventory, and publishes the directory as one fresh set; a failed
capture leaves the prior published set unchanged. It captures the rendered
Music and Podcasts pages at 375, 768, 1440, and 2560 px in light and dark themes.
The long-copy Podcast state changes only the rendered latest-card title and
excerpt; it does not write to the database. Source masters remain authoritative,
and responsive media must be rebuilt with `scripts/build-responsive-images.sh`
after any approved source change. Treat these screenshots as disposable review
evidence: keep them uncommitted, obtain visual approval before committing this
stage, and do not begin the next visual task until that approval is recorded.
PHPUnit always runs through wp-env's isolated `tests-cli` database. The browser
suite uses the separate development `cli` database; its serial scenario project