seahaven-ap/playwright.config.ts
2026-08-14 12:28:35 -04:00

45 lines
1.1 KiB
TypeScript

import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
testDir: "./e2e",
fullyParallel: true,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? "github" : "list",
use: {
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
testIgnore: /sea-haven-brand/,
use: {
...devices["Desktop Chrome"],
baseURL: "http://localhost:4173",
},
},
{
name: "sea-haven-brand",
testMatch: /sea-haven-brand/,
use: {
...devices["Desktop Chrome"],
baseURL: "http://localhost:4174",
},
},
],
webServer: [
{
command: "VITE_SEA_HAVEN_BRAND=false npm run dev -- --port 4173 --strictPort",
url: "http://localhost:4173",
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
{
command: "VITE_SEA_HAVEN_BRAND=true npm run dev -- --port 4174 --strictPort",
url: "http://localhost:4174",
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
],
});