mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-08 17:02:17 +00:00
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
/**
|
|
* End-to-end tests in plain-browser mode: Vite serves the UI, the shell injects
|
|
* a sample project and features fall back to in-memory backends (no Tauri, no
|
|
* network). Run with `pnpm e2e`.
|
|
*/
|
|
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const PORT = Number(process.env.OPENIDEA_E2E_PORT ?? 1450);
|
|
|
|
export default defineConfig({
|
|
testDir: "./e2e",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 0,
|
|
workers: process.env.CI ? 2 : undefined,
|
|
timeout: 30_000,
|
|
expect: { timeout: 10_000 },
|
|
reporter: process.env.CI ? [["list"], ["html", { open: "never" }]] : "list",
|
|
use: {
|
|
baseURL: `http://localhost:${PORT}`,
|
|
viewport: { width: 1400, height: 900 },
|
|
trace: "retain-on-failure",
|
|
// The workbench keeps indeterminate progress animations running; screenshots
|
|
// are taken explicitly with `animations: "disabled"` instead.
|
|
screenshot: "off",
|
|
},
|
|
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"], viewport: { width: 1400, height: 900 } } }],
|
|
webServer: {
|
|
command: `pnpm exec vite --port ${PORT} --strictPort`,
|
|
url: `http://localhost:${PORT}`,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 60_000,
|
|
stdout: "ignore",
|
|
stderr: "pipe",
|
|
},
|
|
});
|