Interaction testing
UI Verify runs your Storybook interaction tests - it executes each story's play function and gates the build on it before capturing the snapshot.
An interaction test drives a component the way a user would - it clicks, types, and asserts - and in Storybook that logic lives in a story's play function. For a Storybook build, UI Verify runs each story's play function and waits for it to pass before it captures the snapshot, so the image you diff is the settled state after the interaction, not the component at first paint.
What UI Verify does with a play function
When a story defines a play function, UI Verify executes it and waits for it to finish before taking the screenshot. The snapshot is therefore of the interacted, settled frame - a menu opened, a form filled, a tab switched - which is the same final frame Chromatic captures for the same story. You do not author anything extra: UI Verify runs the play you already wrote for Storybook, so a component you test through interactions is screenshotted in the state those interactions leave it in. See how visual testing works.
What happens when an interaction test fails
A play function that throws is a failed interaction test, and UI Verify treats it as distinct from a render error. That frame is never diffed and never promoted to a baseline - a story only becomes a trusted baseline once its interaction test passes - so a broken interaction cannot quietly become the reference image the next run compares against.
Does UI Verify run interaction tests without Storybook?
No. Interaction tests are the Storybook play concept, so they run on the Storybook capture path only. Playwright and Vitest archive builds capture the state your own test drives the page or component into - there is no separate play step to run there, because your Playwright or Vitest test already performed the interactions before the archive was recorded.
Visual testing for agents
UI Verify captures your UI on every pull request and an AI judge tells an intended change from a real regression. See how it works.
Get started