-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
30 lines (28 loc) · 1.35 KB
/
Copy pathplaywright.config.ts
File metadata and controls
30 lines (28 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { defineConfig, devices } from "@playwright/test";
// E2E for the authoring app. By default runs against a local `vite preview` of
// the built app; set E2E_BASE_URL to test a deployed URL (e.g. prod). The
// live-render tests (which need the external Sandpack bundler) only run when
// E2E_LIVE=1 — kept off by default so PR CI stays deterministic.
const baseURL = process.env.E2E_BASE_URL || "http://localhost:4173";
export default defineConfig({
testDir: "./e2e",
timeout: 60_000,
expect: { timeout: 15_000 },
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
// In CI, "github" alone leaves `playwright-report/` empty — the workflows
// upload that directory on failure, and until DEV-2203 the artifact was a
// no-op. The html reporter fills it; traces land in `test-results/`.
reporter: process.env.CI ? [["list"], ["github"], ["html", { open: "never" }]] : "list",
use: { baseURL, trace: "on-first-retry" },
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
// Start a local preview only when not pointing at an external URL.
webServer: process.env.E2E_BASE_URL
? undefined
: {
command: "pnpm --filter @handsontable/demo-authoring preview -- --port 4173 --strictPort",
url: "http://localhost:4173",
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});