Files
flights_web/playwright.config.ts
T

32 lines
789 B
TypeScript

import { defineConfig } from "@playwright/test";
const baseURL = process.env.BASE_URL ?? "http://localhost:8080";
const startLocalServer = !process.env.BASE_URL;
export default defineConfig({
testDir: "tests/e2e",
timeout: 30000,
use: {
baseURL,
headless: true,
httpCredentials:
process.env.BASIC_AUTH_USER && process.env.BASIC_AUTH_PASS
? {
username: process.env.BASIC_AUTH_USER,
password: process.env.BASIC_AUTH_PASS,
}
: undefined,
},
reporter: [["html", { open: "never" }], ["list"]],
...(startLocalServer
? {
webServer: {
command: "pnpm dev",
url: "http://localhost:8080",
reuseExistingServer: true,
timeout: 30000,
},
}
: {}),
});