-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
55 lines (51 loc) · 1.45 KB
/
playwright.config.ts
File metadata and controls
55 lines (51 loc) · 1.45 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
47
48
49
50
51
52
53
54
55
import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
testDir: "./tests",
fullyParallel: true,
retries: 2,
timeout: 45000,
workers: process.env.CI ? 2 : 4,
reporter: [
["list"],
["html", { open: "never", outputFolder: "playwright-report" }],
["json", { outputFile: "test-results/results.json" }],
["junit", { outputFile: "test-results/junit.xml" }],
],
use: {
baseURL: process.env.ARKON_BASE_URL ?? "http://localhost:3000",
screenshot: "only-on-failure",
video: "retain-on-failure",
trace: "retain-on-failure",
},
projects: [
// Setup project — runs auth once, shares storageState
{
name: "setup",
testMatch: /.*\.setup\.ts/,
},
// Desktop Chrome (primary)
{
name: "chromium-desktop",
use: { ...devices["Desktop Chrome"], storageState: "tests/.auth/admin.json" },
dependencies: ["setup"],
},
// Mobile Chrome
{
name: "chromium-mobile",
use: { ...devices["Pixel 5"], storageState: "tests/.auth/admin.json" },
dependencies: ["setup"],
},
// Firefox (cross-browser)
{
name: "firefox",
use: { ...devices["Desktop Firefox"], storageState: "tests/.auth/admin.json" },
dependencies: ["setup"],
},
// Safari (cross-browser)
{
name: "webkit",
use: { ...devices["Desktop Safari"], storageState: "tests/.auth/admin.json" },
dependencies: ["setup"],
},
],
});