-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
50 lines (45 loc) · 1.23 KB
/
playwright.config.ts
File metadata and controls
50 lines (45 loc) · 1.23 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
import type { PlaywrightTestConfig } from "@playwright/test";
import { devices } from "@playwright/test";
import { commonData } from "./data/common.data";
const config: PlaywrightTestConfig = {
testDir: "./tests",
timeout: 60000,
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 3 : 0,
workers: process.env.CI ? 2 : undefined,
maxFailures: process.env.CI ? 5 : undefined,
reporter: "html",
testMatch: "*.page.spec.ts",
use: {
viewport: { width: 1280, height: 1920 },
trace: "retain-on-failure",
video: "retain-on-failure",
screenshot: "only-on-failure",
actionTimeout: 10 * 1000,
navigationTimeout: 30 * 1000,
},
globalSetup: require.resolve("./global-setup"),
/* Configure projects for major browsers */
projects: [
{
name: "chromium",
testMatch: /^((?!signIn).)*$/,
use: {
baseURL: commonData.githubUrl,
storageState: commonData.storageState,
...devices["Desktop Chrome"],
},
},
{
name: "Microsoft Edge",
testMatch: /.*\.spec\.ts/,
use: {
baseURL: commonData.githubUrl,
storageState: commonData.storageState,
channel: "msedge",
},
},
],
};
export default config;