This repo now uses a small validation baseline designed for static or frontend-heavy sites that need repeatable merge checks without a large test harness.
- Existing repo validation kept: the Eleventy build remains the core baseline and is run before browser checks.
- Playwright smoke coverage: focused on the highest-value flows for this site:
- homepage loads with the key archive entry points,
- homepage search leads into a real article,
- gallery lightbox opens, advances, and closes.
- Accessibility check: a scoped
@axe-core/playwrightscan of the search results experience (/search/?q=bhairava), which is a stable critical discovery flow. - Visual regression: only three stable surfaces are snapshotted:
- homepage hero,
- search landing panel,
- gallery featured row.
- Performance budget: a Playwright budget test for the homepage shell using navigation timings, LCP, resource count, and transfer size.
- CI baseline: GitHub Actions runs the Playwright suite on Windows + Chromium so the committed visual baselines match the platform used to capture them locally.
- Link checking in CI:
lycheeverse/lychee-actionchecksREADME.mdplus built key entry pages after the site is generated.
For a similar repo, start by copying and then adapting these files:
playwright.config.jsscripts/serve_test_site.jstests/helpers/site.jstests/smoke/tests/accessibility/tests/visual/tests/performance/.github/workflows/validation.yml- the
package.jsonvalidation scripts
- Keep the build/test command that already matters. In this repo that is
npm run build. - Pick only 1-3 smoke flows. Choose routes that represent the real happy path, not every feature.
- Scope accessibility to one stable critical flow first. Expand only after that path is reliable.
- Choose visual targets that do not churn. Prefer stable panels/sections over full pages.
- Measure before choosing budgets. Start with current timings, then set thresholds with some headroom.
- Match CI to the snapshot platform. If baselines are captured on Windows, keep CI on Windows until you intentionally rebaseline elsewhere.
- Run the full browser validation baseline:
npm run validate
- Refresh visual baselines intentionally:
npm run validate:update-snapshots
Only update screenshots when the UI change is expected.
- Make the intended UI change.
- Run:
npm run validate:update-snapshots
- Review the files created or changed under
tests/visual/*-snapshots/. - Re-run the full suite with:
npm run validate
- Commit the updated snapshot files with the code change that required them.
- The validation helpers block analytics and Google-hosted font requests so browser tests stay deterministic.
- The smoke suite prefers semantic selectors and stable text over brittle DOM indexing.
- The visual scope is intentionally narrow so this stays reviewable and low-flake.