32 lines
707 B
TypeScript
32 lines
707 B
TypeScript
import { defineConfig, devices } from "@playwright/test"
|
|
|
|
const port = process.env.E2E_PORT ?? "3100"
|
|
const baseURL = `http://127.0.0.1:${port}`
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests/e2e",
|
|
testMatch: "**/*.spec.ts",
|
|
timeout: 60_000,
|
|
fullyParallel: false,
|
|
forbidOnly: !!process.env.CI,
|
|
workers: 1,
|
|
retries: process.env.CI ? 2 : 0,
|
|
reporter: process.env.CI ? "github" : "list",
|
|
use: {
|
|
baseURL,
|
|
trace: "on-first-retry",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: "bun tests/e2e/support/e2e-server.ts",
|
|
url: baseURL,
|
|
timeout: 180_000,
|
|
reuseExistingServer: false,
|
|
},
|
|
})
|