Files
edgeever/playwright.config.ts
T

35 lines
796 B
TypeScript

import { defineConfig, devices } from "@playwright/test";
import { E2E_STORAGE_STATE_PATH } from "./tests/e2e/global-setup";
export default defineConfig({
testDir: "./tests/e2e",
globalSetup: "./tests/e2e/global-setup.ts",
fullyParallel: false,
workers: 1,
timeout: 45_000,
expect: {
timeout: 10_000,
},
use: {
baseURL: "http://127.0.0.1:5173",
locale: "zh-CN",
storageState: E2E_STORAGE_STATE_PATH,
screenshot: "only-on-failure",
trace: "retain-on-failure",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
webServer: {
command: "bun run dev",
url: "http://127.0.0.1:5173",
reuseExistingServer: !process.env.CI,
timeout: 120_000,
stdout: "pipe",
stderr: "pipe",
},
});