import { defineConfig, devices } from "@playwright/test"; /** * End-to-end tests against the real frontend in a real browser. * * WebKit is the one that matters: it is what WKWebView on macOS actually is, * so it is the only way to find out whether something works in the shipped app * rather than only in Chromium. Chromium stands in for WebView2 on Windows. * Neither needs Tauri running — the IPC boundary is mocked, which is also what * makes these runnable in CI with no native toolchain. */ export default defineConfig({ testDir: "./tests/e2e", fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, reporter: process.env.CI ? "github" : "list", use: { baseURL: "http://localhost:1420", trace: "on-first-retry", }, projects: [ { name: "webkit", use: { ...devices["Desktop Safari"] } }, { name: "chromium", use: { ...devices["Desktop Chrome"] } }, ], webServer: { command: "pnpm dev", url: "http://localhost:1420", reuseExistingServer: !process.env.CI, stdout: "ignore", }, });