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

/**
 * E2E tests run against a live stack: the API on :8000 and the dashboard on :3000.
 * Start both (see README), then `npm run test:e2e`. Point at other hosts with
 * PLAYWRIGHT_BASE_URL / NEXT_PUBLIC_API_BASE_URL.
 */
export default defineConfig({
  testDir: "./tests/e2e",
  timeout: 30_000,
  fullyParallel: false,
  retries: 0,
  reporter: [["list"]],
  use: {
    baseURL: process.env.PLAYWRIGHT_BASE_URL ?? "http://localhost:3000",
    trace: "on-first-retry",
  },
  projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
});
