30 lines
785 B
TypeScript
30 lines
785 B
TypeScript
import { defineConfig } from "@playwright/test";
|
|
|
|
const channel = process.env.PLAYWRIGHT_CHANNEL?.trim();
|
|
const executablePath = process.env.PLAYWRIGHT_EXECUTABLE_PATH?.trim();
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests/e2e",
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
timeout: 30_000,
|
|
expect: {
|
|
timeout: 6_000,
|
|
},
|
|
use: {
|
|
baseURL: "http://127.0.0.1:4173",
|
|
...(channel ? { channel } : {}),
|
|
...(executablePath ? { launchOptions: { executablePath } } : {}),
|
|
headless: true,
|
|
viewport: { width: 1440, height: 900 },
|
|
screenshot: "only-on-failure",
|
|
trace: "retain-on-failure",
|
|
},
|
|
webServer: {
|
|
command: "npm run dev -- --port 4173 --strictPort",
|
|
url: "http://127.0.0.1:4173",
|
|
reuseExistingServer: false,
|
|
timeout: 60_000,
|
|
},
|
|
});
|