import { defineConfig, devices } from '@playwright/test';

// Run: `npx playwright test -c tests/playwright.config.ts`
//
// Tests load fixture HTML files via file:// URLs — no dev server needed.
// The web-component bundle (dist/web-component/index.js) must be built first
// (`npm run build`); tests reference it via relative paths.

export default defineConfig({
  testDir: './theme-regression',
  fullyParallel: true,
  retries: 0,
  reporter: 'list',
  use: {
    headless: true,
    screenshot: 'only-on-failure',
  },
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'firefox', use: { ...devices['Desktop Firefox'] } },
    { name: 'webkit', use: { ...devices['Desktop Safari'] } },
  ],
});
