The Playwright configuration for Maquette defines how browser tests are executed, including timeouts, parallelization, and environment-specific behaviors (CI vs. local).
Key settings include:
testDir: Set to ./tests.timeout: Global test timeout is 60,000ms.fullyParallel: Enabled to run files in parallel.forbidOnly: Enabled when process.env.CI is present to prevent accidental test.only commits.retries: Set to 2 on CI, 0 locally.workers: Limited to 1 on CI to prevent flakiness; otherwise, uses default.reporter: Uses github and html (with open: 'never') on CI; uses html locally.
To run tests, ensure your environment matches the expected baseURL and webServer configuration.
import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
testDir: "./tests",
timeout: 60000,
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? [["github"], ["html", { open: "never" }]] : "html",
});