-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathplaywright.dev.config.ts
More file actions
42 lines (41 loc) · 1.1 KB
/
playwright.dev.config.ts
File metadata and controls
42 lines (41 loc) · 1.1 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
31
32
33
34
35
36
37
38
39
40
41
42
import { defineConfig, devices } from "@playwright/test";
/**
* Playwright configuration for running E2E tests against the Vite dev server.
*
* Use this config during development for faster feedback loop:
* - No build step required
* - Uses Vite's HMR for quick iteration
*
* Note: Dev server uses native ESM (no chunking), so it won't catch
* ESM initialization order bugs. Use the production config (playwright.config.ts)
* to test bundled output.
*
* @example
* npm run test:e2e:dev
*/
export default defineConfig({
webServer: {
command: "npm run dev",
port: 5173,
reuseExistingServer: !process.env.CI,
},
testDir: "e2e",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: 2,
reporter: [["html", { open: "never" }]],
use: {
baseURL: "http://localhost:5173",
trace: "on-first-retry",
screenshot: "only-on-failure",
actionTimeout: 10_000,
navigationTimeout: 30_000,
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
// Only chromium for dev - full browser matrix uses production config
],
});