33 lines
795 B
TypeScript
33 lines
795 B
TypeScript
import { defineConfig } from "@playwright/test";
|
|
|
|
const baseURL = process.env.E2E_BASE_URL || "http://127.0.0.1:3100";
|
|
|
|
export default defineConfig({
|
|
testDir: "./e2e",
|
|
timeout: 30_000,
|
|
expect: { timeout: 5_000 },
|
|
fullyParallel: true,
|
|
forbidOnly: Boolean(process.env.CI),
|
|
retries: process.env.CI ? 2 : 0,
|
|
reporter: "line",
|
|
use: {
|
|
baseURL,
|
|
trace: "retain-on-failure",
|
|
screenshot: "only-on-failure",
|
|
viewport: { width: 1440, height: 1000 },
|
|
},
|
|
webServer: process.env.E2E_BASE_URL
|
|
? undefined
|
|
: {
|
|
command: "npm run start",
|
|
url: baseURL,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
env: {
|
|
HOSTNAME: "127.0.0.1",
|
|
PORT: "3100",
|
|
NODE_ENV: "production",
|
|
},
|
|
},
|
|
});
|