// tdd-guard:skip — Playwright E2E config; not a Vitest test file.
//
// IMPORTANT: This config is SCAFFOLDED — tests are marked fixme and require
// a running application + seeded DB before they can be enabled.
//
// Install: npm install --save-dev @playwright/test && npx playwright install chromium
// See: docs/E2E.md for full setup instructions.

// @ts-expect-error — @playwright/test is a devDependency; install before running
import { defineConfig, devices } from '@playwright/test'

export default defineConfig({
  testDir: './e2e',
  timeout:  60_000,
  retries:  0,
  reporter: 'html',

  use: {
    baseURL:    process.env.E2E_BASE_URL ?? 'http://localhost:3000',
    screenshot: 'only-on-failure',
    video:      'off',
  },

  projects: [
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'] },
    },
  ],

  // Do NOT run Playwright with `npm test` — only on explicit `npx playwright test` invocation.
  // This config is intentionally excluded from vitest.config.ts include globs.
})
