28 lines
703 B
TypeScript
28 lines
703 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const vitePort = 5179;
|
|
|
|
export default defineConfig({
|
|
testDir: "./e2e",
|
|
testMatch: "**/*.spec.ts",
|
|
timeout: 120_000,
|
|
expect: { timeout: 15_000 },
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
retries: 0,
|
|
reporter: [["list"]],
|
|
// webServer 在 globalSetup 之前启动,故在 start-stack 内起 nixmsg + Vite
|
|
globalTeardown: "./e2e/global-teardown.ts",
|
|
use: {
|
|
...devices["Desktop Chrome"],
|
|
baseURL: `http://127.0.0.1:${vitePort}`,
|
|
trace: "on-first-retry",
|
|
},
|
|
webServer: {
|
|
command: "node e2e/start-stack.mjs",
|
|
url: `http://127.0.0.1:${vitePort}`,
|
|
reuseExistingServer: false,
|
|
timeout: 180_000,
|
|
},
|
|
});
|