/
playwright.config.ts
58 lines (55 loc) · 1.45 KB
/
playwright.config.ts
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
56
57
58
import { PlaywrightTestConfig } from "@playwright/test";
export const baseURL = "https://reqres.in/api";
const config: PlaywrightTestConfig = {
//Directory where your tests are located
testDir: "tests/",
// Time for each of your test to run from start to finish (60 seconds), increase if needed
timeout: 60 * 1000,
//It will fail your tests on CI if you have tests.only() or describe.only() in your tests
forbidOnly: !!process.env.CI,
// Option for your CI to retry.
retries: process.env.CI ? 2 : 0,
expect: {
// Time for your expect() assertion to run and find desired condition (30 seconds)
//
timeout: 30 * 1000,
},
//It will let all your tests run in parallel
fullyParallel: true,
// Here you can choose which reporter to use
// TODO: describe more reporter options
reporter: "html",
use: {
headless: true,
viewport: { width: 1280, height: 720 },
actionTimeout: 10 * 1000,
ignoreHTTPSErrors: true,
video: "retain-on-failure",
screenshot: "off",
},
// Here you can specify which browsers you want to run your tests on
projects: [
{
name: "Chromium",
use: {
browserName: "chromium",
headless: true,
},
},
{
name: "Firefox",
use: {
browserName: "firefox",
headless: true,
},
},
{
name: "WebKit",
use: {
browserName: "webkit",
headless: true,
},
},
],
};
export default config;