2.9 KiB
HP-QA-01 golden images
This layer catches visual regressions that DOM smokes cannot: wall seams and end caps, thick opening tunnels, Glow/sun clipping, hover contours, editor chrome, the open contextual tray at wide/medium/narrow widths in English and Russian (selection, tool options, group and palette), long dialog titles/footers, mobile clipping, themes and zoom/remount. The desktop and mobile device-dialog scenarios use a real light and make the complete source-role, Glow colour, brightness and radius controls visible; capturing only the top of that section fails the scenario before comparison. The Glow matrix also keeps one deliberately opaque custom-fill scene with a single source and two doorways: it makes hard spill wedges and fully unlit radial spokes visible instead of hiding them under a translucent room fill.
Safety contract
- A build fingerprint embedded by Rollup must match
src/, Rollup/TypeScript configuration and locked package inputs; stale committed demo bundles fail before the first screenshot. - Chromium, viewport, locale, timezone, colour profile, font rendering, animations and caret are controlled by the runner.
capturewrites only to ignoredartifacts/golden/; it never changes a baseline and never claims a missing baseline passed. Any scenario runtime error makes capture fail, including the initial no-baseline CI run.verifyrequires every image plus a matching matrix manifest and fails on missing/different/error scenarios, browser mismatch or a baseline whose hash no longer matches the reviewed manifest.acceptrequires--reviewed, a complete candidate report and current source fingerprint. It validates the whole set before copying anything and is the only command allowed to update baselines.
Workflow
Build and copy the exact current source first:
npm run build
npm run bundle:sync
npm run golden:capture
Review artifacts/golden/actual/ and, when existing references are present,
artifacts/golden/diff/. If every image is intentional:
npm run golden:accept -- --reviewed
npm run golden:verify
Never accept images merely to make CI green. A matrix/framing change increments
GOLDEN_MATRIX_VERSION; a normal rendering fix does not. The first canonical
Linux baseline was reviewed and accepted during the v1.60.3-beta.1 gate.
Future updates must still use the golden-images artifact produced by the Linux
CI job as the review set: desktop font rasterisation can differ from the CI
environment even with the same pinned Chromium. Pass its unpacked root via
--from=... when accepting it locally.
Scenarios may also declare a semantic pixel region (for example, a receiving
room that must contain warm light). golden:capture and golden:verify reject
the capture before baseline comparison when that visual precondition is empty;
a reviewed but meaningless PNG therefore cannot become the contract.