vrt-testing

Implement deterministic visual regression tests for Storybook components using Playwright.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/sugar-cat7/ai-avatar-interview --skill vrt-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vrt-testing
Source: https://github.com/sugar-cat7/ai-avatar-interview/tree/main/.agent/skills/vrt-testing
Command: npx skills add https://github.com/sugar-cat7/ai-avatar-interview --skill vrt-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Storybook + Playwright の VRT を実装し、スナップショット差分で UI の退行を検知するための実用的なフレームワーク。非決定要素を固定し、モック最小で運用する。

Core Features & Use Cases

  • Deterministic VRT: 非決定要素を固定してスナップショットの比較を安定化。
  • Storybook + Playwright Integration: Storybook のストーリーを Playwright で自動的に検証。
  • Use Case: 新しい UI コンポーネントの追加や既存の退行を検知して差分を報告する。

Quick Start

Set up Storybook stories and Playwright tests to capture and compare visuals with fixed time, viewport, and mocks.

Frequently Asked Questions about vrt-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up deterministic visual regression testing for Storybook components?

Deterministic visual regression testing for Storybook is set up by integrating Storybook stories with Playwright automation. You apply fixed time, viewport settings, and minimal mocks to capture and compare stable snapshots.

Why do my Storybook visual regression snapshots show false positives?

Storybook visual regression snapshots show false positives when non-deterministic elements like time or viewport dimensions are not fixed. Stabilize snapshot comparisons by mocking time and applying fixed viewport settings in Playwright.

Can I use Playwright to detect UI drift in Storybook stories?

Yes, you can use Playwright to detect UI drift by automatically verifying Storybook stories. Playwright integrates with your stories to produce snapshot comparisons that report visual regressions for new or existing components.

What's the best way to automate snapshot comparisons for Storybook UI components?

The best way to automate snapshot comparisons for Storybook UI is using Playwright to capture visuals with mocked time and fixed viewport settings. This framework enforces stable snapshots and detects UI drift through regression testing.

Do I need to mock everything to get stable snapshot comparisons in visual regression testing?

No, you do not need to mock everything to get stable snapshot comparisons. This visual regression testing framework operates with minimal mocks by fixing non-deterministic elements like time and viewport settings to stabilize snapshot comparisons.

What limitations should I expect when using Playwright for Storybook visual regression testing?

When using Playwright for Storybook visual regression testing, limitations include the need to manually fix non-deterministic elements and configure viewport settings to prevent snapshot comparison drift, requiring careful environment setup for stable results.