Skip to content

add self-hosted visual regression coverage#550

Open
bgentry wants to merge 3 commits intomasterfrom
bg/visual-regression-plan
Open

add self-hosted visual regression coverage#550
bgentry wants to merge 3 commits intomasterfrom
bg/visual-regression-plan

Conversation

@bgentry
Copy link
Copy Markdown
Contributor

@bgentry bgentry commented Apr 21, 2026

This adds a self-hosted Storybook regression workflow so UI behavior is covered in CI without relying on an external visual testing service. Story rendering is now exercised via a dedicated Storybook Vitest project, and visual diffs are handled with Playwright snapshots for stories tagged with visual.

It also adds the deterministic fixtures and visual-test plumbing needed to keep screenshots stable, seeds an initial baseline set for Badge, TagInput, and JSONView, and documents the ongoing workflow for tagging stories, running visual tests, and updating snapshots.

Along the way, CI/runtime tooling was brought forward so the pipeline stays current: workflow action pins were moved to current major versions, and Node runtime pins were moved to the 24 LTS line in workflows and Docker build stages.

@bgentry bgentry force-pushed the bg/visual-regression-plan branch from 4aca7da to 0625907 Compare April 21, 2026 18:55
bgentry added 2 commits April 21, 2026 16:29
Storybook scenarios were not exercised in CI, and there was no
self-hosted screenshot baseline for catching unintended UI changes.
This left UI regressions dependent on manual review and an external
visual testing addon.

Switch Storybook testing to a self-hosted model by wiring a dedicated
storybook test project in Vitest and adding a Playwright visual suite
that snapshots stories tagged with `visual`. The visual runner builds
and serves static Storybook output, honors optional per-story
`parameters.visual` settings, disables motion for deterministic output,
and commits an initial baseline set for stable component stories.

The CI workflow now includes an isolated Storybook/visual job that
runs story execution separately from screenshot assertions and uploads
Playwright artifacts when diffs fail. Story fixtures that depended on
current time or randomness were made deterministic so baseline images
remain stable.

This adds initial coverage for the tagged Badge, TagInput, and JSON
stories through committed Playwright snapshots, and broad story
execution coverage through the Storybook Vitest project.
The repository still pinned parts of the build and packaging pipeline to
Node 22, which diverged from the current production LTS line and could
cause inconsistent behavior between CI/package builds and the intended
runtime baseline.

Update the Node runtime pins to the 24 LTS line for packaging and image
build stages, and keep the packaging workflow's Node selection
centralized through `NODE_VERSION`.

This keeps Docker image Node pins explicit for Dependabot visibility
while aligning build-time Node usage with the updated LTS target.
@bgentry bgentry force-pushed the bg/visual-regression-plan branch from 06ca3b9 to 256f6a4 Compare April 21, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant