This commit is contained in:
2026-02-10 02:06:54 +01:00
parent 5290560d68
commit ef5e98ad5d
29 changed files with 1529 additions and 8 deletions

47
playwright.config.ts Normal file
View File

@ -0,0 +1,47 @@
import { defineConfig, devices } from "@playwright/test"
const isCi = Boolean(process.env.CI)
export default defineConfig({
testDir: "./e2e",
testMatch: "**/*.pw.ts",
globalSetup: "./e2e/global-setup.ts",
fullyParallel: true,
forbidOnly: isCi,
retries: isCi ? 2 : 0,
workers: isCi ? 1 : undefined,
reporter: [["list"], ["html", { open: "never" }]],
use: {
trace: "on-first-retry",
},
webServer: [
{
command: "bun --filter @cms/web dev",
port: 3000,
reuseExistingServer: !isCi,
timeout: 120_000,
},
{
command: "bun --filter @cms/admin dev",
port: 3001,
reuseExistingServer: !isCi,
timeout: 120_000,
},
],
projects: [
{
name: "web-chromium",
use: {
...devices["Desktop Chrome"],
baseURL: "http://127.0.0.1:3000",
},
},
{
name: "admin-chromium",
use: {
...devices["Desktop Chrome"],
baseURL: "http://127.0.0.1:3001",
},
},
],
})