41 lines
1013 B
TypeScript
41 lines
1013 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"] },
|
|
},
|
|
{
|
|
name: "webkit",
|
|
// Keep Safari coverage focused on the appearance interactions for now.
|
|
testMatch: "notebook-appearance.spec.ts",
|
|
use: { ...devices["Desktop Safari"] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: "bun run dev",
|
|
url: "http://127.0.0.1:5173/api/health",
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
stdout: "pipe",
|
|
stderr: "pipe",
|
|
},
|
|
});
|