Here's a bug that passed every test in the suite. Someone renamed a design token from --brand to --color-brand in tokens.css. The checkout button's stylesheet still referenced the old name, so var(--brand) resolved to nothing, the button's background went transparent, and a white label sat on a white card. Gone. The Jest snapshot test for that component ran clean: Snapshots: 1 passed, because a serialized snapshot only records markup — element names, classes, attributes — not what the browser actually painted (UI Verify). The .snap file never changed. It had no idea the button disappeared.
That's the case for pixel-based visual regression testing, and it's a real one. But the same mechanism that catches invisible buttons also generates a steady stream of failures nobody wants to triage. Both things are true, and which one dominates your week depends entirely on how you've set the tool up.
The catch is real, and it's getting more important
Snapshot testing (Jest, Vitest's toMatchSnapshot) and visual regression testing (Playwright's toHaveScreenshot, Vitest browser mode's toMatchScreenshot) fail on almost opposite changes. Snapshot tests churn on harmless refactors because any markup change trips them, even when nothing visible moved. Visual regression tests miss nothing a browser paints, but they catch CSS changes a serialized DOM tree can't see at all (UI Verify). If your design system ships tokens that cascade into dozens of components, this is the only layer of testing that notices when a token edit three files away quietly breaks a hover state on a button nobody was looking at.
That gap matters more now that agents are the ones editing component code. Trail of Bits reviewed its own merged pull requests and found that across more than 130 merged patches, 21 turned out to be real regressions — 16 functional, 1 performance, 4 in build or tests — out of 58 candidates an initial agent pass had flagged, about 36% precision (via DEV Community). That's server code, not UI, but the same piece makes the obvious point: a reviewer glancing at a diff where --primary: #1a7f4b becomes --primary: #1b8250 has no way to know that token feeds hover states, disabled states, focus rings, and dark mode. Nothing in the diff looks wrong. In shadcn-style setups where component source lives directly in your repo, an agent can edit that token and nobody checks the four other states it touches (DEV Community).
The busywork is also real, and it's where most teams actually live
Here's the part the pro-visual-regression pitch skips: pixel comparison is noisy by construction. A one-pixel shift from font rendering or a browser version bump can trigger a false positive that has nothing to do with the change you made (DEV Community). Go look at any real test suite with visual regression wired in and you'll find exactly this: an e2e visual-regression spec failing on every run because the baseline is flaky, the comparator can't decide if a snapshot drifted or simply never existed, and the fix under discussion is "regenerate from CI, exclude the flaky project, or just accept the diff" (GitHub). None of those options are wrong, exactly. They're also not design decisions — they're baseline maintenance, and baseline maintenance is the tax visual regression testing charges you for the catch it offers.
The honest framing is that visual testing is one job among several, not a replacement for the others. Functional testing asks if the button submits the form. Visual testing asks if it still looks right. Accessibility testing asks if a keyboard user can reach it. Cross-browser testing asks if Safari on mobile agrees with Chrome on your laptop (Sitepoint). Teams that try to make visual regression carry all four jobs end up with either enormous baseline sets that drift constantly, or thin coverage that misses the thing it was supposed to catch.
Where this actually earns its keep
Put visual regression on the shared primitives — buttons, inputs, the token layer itself — where a single rename can silently break a dozen downstream components, and skip it on screens that change every sprint by design. A dedicated design-QA pass against Figma specs can catch spacing and typography drift that pixel diffing treats as noise anyway (OverlayQA), which means you don't need visual regression to cover the whole surface — just the part where an invisible change can hide behind a green checkmark. If your baselines need weekly regeneration to stay green, that's not flakiness to tolerate. That's a signal the scope is wrong.
