Todo
This commit is contained in:
47
playwright.config.ts
Normal file
47
playwright.config.ts
Normal 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",
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user