import { defineConfig, devices } from "@playwright/test"; export default defineConfig({ testDir: "./tests", testMatch: "**/*.spec.ts", use: { baseURL: "http://127.0.0.1:5473", trace: "retain-on-failure" }, projects: [ { name: "chromium", use: { ...devices["Desktop Chrome"] } }, { name: "webkit", use: { ...devices["iPhone 13"], defaultBrowserType: "webkit" }, }, ], webServer: [ { command: "npm run dev -- --host 127.0.0.1 --port 5473 --strictPort", url: "http://127.0.0.1:5473", reuseExistingServer: false, }, // The production build, for the service worker and offline checks. { command: "npm run build && npx vite preview --host 127.0.0.1 --port 4473 --strictPort", url: "http://127.0.0.1:4473", reuseExistingServer: false, timeout: 120_000, }, ], });