web: capture-set comparator for behaviour-preserving refactors
--compare BEFORE AFTER fails when a capture is missing or unexpected and lists pixel drift for manual review; live durations make byte equality the wrong gate.
This commit is contained in:
+7
-1
@@ -59,7 +59,13 @@ node test/ui-smoke.mjs --out /path/to/run/artifacts # browser, live, scree
|
||||
```
|
||||
|
||||
`ui-smoke.mjs` starts `serve.mjs`, launches the installed Chrome headless, drives
|
||||
the real page and writes PNGs into `--out`. **That is the UI evidence**: a review
|
||||
the real page and writes PNGs into `--out`. It picks a free port unless one is
|
||||
given, so concurrent checks never collide.
|
||||
|
||||
`capture-manifest.mjs` compares two capture directories. A behaviour-preserving
|
||||
refactor must keep the same capture SET; `--compare BEFORE AFTER` exits non-zero
|
||||
when a capture is missing or unexpected and lists the files whose pixels drifted
|
||||
(live durations legitimately change bytes, so inspect that list by eye). **That is the UI evidence**: a review
|
||||
stage must run it (or an extension of it) and report the capture paths, not
|
||||
describe what it thinks would render. Set `CHROME_PATH` if Chrome is not at the
|
||||
default macOS location.
|
||||
|
||||
Reference in New Issue
Block a user