Files
agentic-dev/playwright.config.ts
Danijel Martinek f77e6ea881 chore(template): clean-slate template snapshot from bb4a0c7
Curated, product-agnostic snapshot of the post-story-04 tree: demo
content deleted, auth-only reference feature, web-next shell, all gates
green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor
library traces, and product naming are curated out; generic template
repairs (coverage provider devDeps, root test:coverage script, live
lint fixes, root-only release-please) are kept. See TEMPLATE.md for
provenance, curation list, and usage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
2026-07-12 20:40:54 +02:00

31 lines
1.0 KiB
TypeScript

import { defineConfig, devices } from "@playwright/test";
/**
* Playwright config for visual regression against Storybook.
*
* Expectations:
* - Storybook is served at http://localhost:6006 BEFORE running these tests.
* The pnpm test:visual script wraps the start + run + stop dance.
* - Screenshot baselines live next to each test file in __snapshots__/.
* - One browser (chromium) is enough for v1; multi-browser comes later.
*/
export default defineConfig({
testDir: "./apps/storybook/tests",
testMatch: /.*\.spec\.ts/,
fullyParallel: false,
reporter: process.env.CI ? "github" : "list",
use: {
baseURL: "http://localhost:6006",
viewport: { width: 1280, height: 720 },
screenshot: "only-on-failure",
},
expect: {
toHaveScreenshot: {
// Tolerate up to 1% pixel difference. Tune when first real component
// lands and the noise floor is measurable.
maxDiffPixelRatio: 0.01,
},
},
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
});