-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathplaywright.config.ts
56 lines (52 loc) · 1.17 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
import { defineConfig, devices } from "@playwright/test";
const debugOptions = {
// headless: false,
launchOptions: {
slowMo: 1000,
},
};
export default defineConfig({
testMatch: /.*(pwtest)\.(js|ts|mjs)/,
workers: 1, // disable concurrent tests
projects: [
{
name: "Chromium - Desktop",
use: {
...devices["Desktop Chrome"],
...debugOptions,
},
},
{
name: "Chrome - Mobile",
use: {
...devices["Pixel 5"],
...debugOptions,
},
},
{
name: "Safari - Mobile",
use: {
...devices["iPhone 12"],
isMobile: false, // Workaround: without this, "search by tag" test fails
...debugOptions,
},
},
// Temporarily disable Firefox tests because it does not pass for unknown reason
// {
// name: "Firefox - Desktop",
// use: {
// ...devices["Desktop Firefox"],
// ...debugOptions,
// },
// },
],
webServer: {
command: "npm run test:server",
url: "http://localhost:5678/ja",
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
},
use: {
baseURL: "http://localhost:5678/ja",
},
});