-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
46 lines (45 loc) · 1.08 KB
/
playwright.config.ts
File metadata and controls
46 lines (45 loc) · 1.08 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
43
44
45
46
import { defineConfig, devices } from "@playwright/test";
/**
* Playwright configuration for UI tests (no backend required).
*
* For API tests that require the backend, use:
* npx playwright test --config=playwright.api.config.ts
*/
export default defineConfig({
forbidOnly: !!process.env.CI,
fullyParallel: true,
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "firefox",
use: {
...devices["Desktop Firefox"],
},
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
],
reporter: "html",
retries: process.env.CI ? 2 : 0,
testDir: "./tests/e2e/ui",
use: {
baseURL: "http://localhost:3000",
screenshot: "only-on-failure",
trace: "on-first-retry",
video: "retain-on-failure",
},
webServer: {
command: process.env.CI
? "npm run start"
: "npm run build:local && npm run start",
reuseExistingServer: !process.env.CI,
timeout: process.env.CI ? 120 * 1000 : 600 * 1000,
url: "http://localhost:3000",
},
workers: 3,
});