Self-hosted runs can compile Vite and warm the API slowly after image validate; extend health, dev-server, signup, and job timeouts so Product CI is not cancelled mid-suite. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
import { isRealSandboxProvider } from "./e2e/helpers";
|
|
|
|
const ci = Boolean(process.env.CI);
|
|
const webPort = Number(process.env.WEB_PORT ?? 5173);
|
|
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? `http://127.0.0.1:${webPort}`;
|
|
const realSandbox = isRealSandboxProvider();
|
|
const boxSandbox = process.env.SANDBOX_PROVIDER === "box";
|
|
const reporters = [
|
|
...(process.env.CI ? ([["github"]] as const) : []),
|
|
["list"] as const,
|
|
["html", { open: "never", outputFolder: "../../playwright-report" }] as const,
|
|
];
|
|
|
|
export default defineConfig({
|
|
testDir: "./e2e",
|
|
forbidOnly: Boolean(process.env.CI),
|
|
fullyParallel: false,
|
|
workers: process.env.CI || realSandbox ? 1 : undefined,
|
|
timeout: boxSandbox ? 600_000 : realSandbox ? 300_000 : 120_000,
|
|
expect: { timeout: boxSandbox ? 300_000 : realSandbox ? 90_000 : 20_000 },
|
|
reporter: reporters,
|
|
use: {
|
|
baseURL,
|
|
trace: "retain-on-failure",
|
|
screenshot: "only-on-failure",
|
|
video: "retain-on-failure",
|
|
},
|
|
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
|
|
webServer: process.env.PLAYWRIGHT_NO_SERVER
|
|
? undefined
|
|
: {
|
|
command: "pnpm dev",
|
|
url: baseURL,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: ci ? 180_000 : 120_000,
|
|
},
|
|
});
|