import { defineConfig, devices } from "@playwright/test"; // Cypress still owns the suites under cypress/e2e; Playwright specs live in // e2e/ so the two don't collide. export default defineConfig({ testDir: "./e2e", fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, reporter: process.env.CI ? "list" : "html", use: { baseURL: process.env.PLAYWRIGHT_BASE_URL ?? "http://localhost:3000", trace: "on-first-retry", screenshot: "only-on-failure", }, // Chromium only: it's the single browser baked into the devcontainer image // (see .devcontainer/Dockerfile). Adding firefox/webkit here means adding // them there too, or runs fail with "Executable doesn't exist". projects: [ { name: "chromium", use: { ...devices["Desktop Chrome"] } }, ], // Boot `next dev` unless something is already serving the base URL, so a dev // server you already have running gets reused rather than fought over. webServer: { command: "npm run dev", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, timeout: 120_000, }, });