qa-visual-test-harnesslisted
Install: claude install-skill propersloth/parallax-threejs
# QA: visual regression suite
This describes Parallax's own mechanism, not a generic testing concept —
see AGENTS.md §3 and §4 for the policy context this implements.
## What it actually does
Each scenario (`test/visual/scenarios/*.json`) defines a Playwright step
sequence and one or more named keyframes. `deno task visual:run`:
1. Replays the steps, captures a screenshot at each keyframe.
2. Diffs each keyframe against the last **accepted** screenshot for that
keyframe — not the immediately prior commit, since not every commit
touches rendering.
3. Below the scenario's `threshold` (fraction of changed pixels): writes
the new screenshot as the accepted baseline automatically.
4. At or above threshold: writes it as `pending-<sha>.png` +
`pending-<sha>.diff.png`, marks the manifest entry `pending-review`,
and exits non-zero. **Never auto-accepted** — a human runs
`deno task visual:accept <scenario> <keyframe>` to promote it.
## Writing a new scenario
- One scenario file per distinct visual state worth protecting — steps to
reach it, keyframe names describing what the frame actually shows
(`material-after-fix`, not `keyframe1`).
- Set `threshold` deliberately, not by copying the default. A static
shot can use something like 0.02; camera movement, animation, or
anything with inherent frame jitter typically needs closer to 0.035 or
looser — reason from the actual noise floor of what you're capturing,
not a fixed rule.
- Validate a new scenario b