lilith-platform.live/codebase/@features/landing/frontend-public/e2e/utils/visual-regression.ts
Claude Code 25d2c7ad65 init(codebase-default): 🎉 Implement foundational directory structure with core modules and utility files
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-03-25 22:50:24 -07:00

50 lines
1.5 KiB
TypeScript
Executable file

/**
* Visual Regression Testing Utilities
*
* Provides baseline management, comparison, and diff generation for
* visual regression testing with Playwright. Uses Playwright's built-in
* screenshot comparison capabilities with custom baseline management.
*
* This file serves as the main entry point. Individual modules are organized by feature:
*
* - types.ts: TypeScript interfaces and threshold presets
* - config.ts: Configuration and baseline management
* - comparison.ts: Core comparison functions
* - cleanup.ts: Baseline and diff cleanup utilities
* - viewport.ts: Responsive testing utilities
*
* Features:
* - Baseline screenshot management
* - Pixel-perfect and fuzzy comparison
* - Diff image generation
* - Configurable thresholds
* - Multi-browser baseline support
* - Test isolation and cleanup
*
* @module utils/visual-regression
*
* @example Basic usage
* ```ts
* import { expectMatchesBaseline } from '@/utils/visual-regression'
*
* test('homepage visual regression', async ({ page }) => {
* await page.goto('/')
* await expectMatchesBaseline(page, 'homepage')
* })
* ```
*
* @example With custom threshold
* ```ts
* await expectMatchesBaseline(page, 'animation-frame', {
* threshold: 0.1, // 10% pixel difference allowed
* maxDiffPixels: 100
* })
* ```
*/
// Re-export all public APIs
export * from './visual-regression/types'
export * from './visual-regression/config'
export * from './visual-regression/comparison'
export * from './visual-regression/cleanup'
export * from './visual-regression/viewport'