Skip to content

visual-regression

Use when setting up visual regression testing, screenshot comparison, or visual CI pipelines. Covers Playwright toHaveScreenshot(), Chromatic for Storybook, Argos CI, and Lost Pixel. Also use when debugging screenshot flakiness or configuring visual testing in Docker CI.

ModelSource
sonnetpack: frontend
Full Reference

┏━ 🔧 visual-regression ━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when setting up visual regression testing,… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Catch UI changes before they ship. Screenshot comparison that fails the build when pixels drift.

Version: Playwright 1.50+ · Chromatic 11+ · Argos @argos-ci/playwright 6.1.3 · Lost Pixel OSS (February 2026)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ScenarioToolWhy
Already have Playwright testsPlaywright toHaveScreenshot()Free, built-in, zero extra deps
Storybook-heavy projectChromaticNative Storybook integration, visual review UI
Open source projectChromatic (free unlimited) or ArgosBoth offer free OSS tiers
Self-hosted requirementLost Pixel EngineFully self-hosted, no cloud dependency
Playwright + cloud review UIArgos CIWraps Playwright with better defaults + PR review
Budget-conscious, no StorybookPlaywright built-in$0 — just needs Docker for CI consistency

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

FileWhat’s inside
reference/playwright-screenshots.mdFull toHaveScreenshot() API, all options, global config, element vs page screenshots, baseline generation
reference/docker-ci.mdWhy Mac vs Linux differs, Docker image setup, baseline generation inside Docker, GitHub Actions workflow
reference/chromatic.mdPricing (Feb 2026), setup, TurboSnap, GitHub Actions integration, review workflow
reference/argos.mdWhen to use vs Chromatic, setup, argosScreenshot() API, GitHub Actions
reference/lost-pixel.mdSupported modes (Storybook/Ladle/Histoire/page/custom), config, OSS engine setup
reference/snapshot-management.mdBaseline update workflow, where baselines live, threshold tuning, dynamic region masking
reference/cross-browser.mdMulti-browser config, mobile viewports, responsive breakpoint testing, project targeting
reference/debugging.mdFlaky screenshot diagnosis table, diff output, animation timing, font rendering, wait helpers

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.