-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
78 lines (69 loc) · 1.74 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { defineConfig, devices } from "@playwright/test";
import dotenv from "dotenv";
import * as path from "node:path";
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const FRONTEND_URL = process.env.FRONTEND_URL || "";
dotenv.config({
path: "./.env.dev",
});
dotenv.config({ path: path.resolve(__dirname, ".env"), override: true });
export default defineConfig({
testDir: "./tests",
timeout: 30 * 2000,
expect: { timeout: 10000 },
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
maxFailures: 9,
workers: process.env.CI ? 2 : undefined,
reporter: [["html"]],
use: {
trace: "on-first-retry",
locale: "de-DE",
timezoneId: "Europe/Brussels",
screenshot: "only-on-failure",
baseURL: FRONTEND_URL,
},
projects: [
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
viewport: { width: 1280, height: 720 },
ignoreHTTPSErrors: true
}
},
{
name: "firefox",
use: {
...devices["Desktop Firefox"],
ignoreHTTPSErrors: true
}
}
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// }
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { channel: 'chrome' },
// },
],
outputDir: "test-results/",
});