|
1 | | -import { defineConfig, devices } from '@playwright/test'; |
| 1 | +import { defineConfig, devices } from "@playwright/test"; |
2 | 2 |
|
3 | 3 | /** |
4 | 4 | * See https://playwright.dev/docs/test-configuration |
5 | 5 | */ |
6 | 6 | export default defineConfig({ |
7 | | - testDir: './e2e', |
| 7 | + testDir: "./e2e", |
8 | 8 | fullyParallel: true, |
9 | 9 | forbidOnly: !!process.env.CI, |
10 | 10 | /* Maximum time one test can run for */ |
11 | 11 | timeout: 30 * 1000, |
12 | 12 | /* Fail the build on CI if test failures */ |
13 | | - reporter: process.env.CI ? 'github' : 'html', |
| 13 | + reporter: process.env.CI ? "github" : "html", |
14 | 14 | /* Shared settings for all projects */ |
15 | 15 | use: { |
16 | 16 | /* Base URL to use in actions like `await page.goto('/')` */ |
17 | | - baseURL: process.env.TEST_BASE_URL ?? 'http://localhost:3000', |
| 17 | + baseURL: process.env.TEST_BASE_URL ?? "http://localhost:3000", |
18 | 18 | /* Collect trace when retrying the failed test */ |
19 | | - trace: 'on-first-retry', |
| 19 | + trace: "on-first-retry", |
20 | 20 | /* Take screenshots on failure */ |
21 | | - screenshot: 'only-on-failure', |
| 21 | + screenshot: "only-on-failure", |
22 | 22 | /* Record video on failure */ |
23 | | - video: 'on-first-retry', |
| 23 | + video: "on-first-retry", |
24 | 24 | }, |
25 | 25 | /* Configure projects for different browsers */ |
26 | 26 | projects: [ |
27 | 27 | { |
28 | | - name: 'chromium', |
29 | | - use: { ...devices['Desktop Chrome'] }, |
| 28 | + name: "chromium", |
| 29 | + use: { ...devices["Desktop Chrome"] }, |
30 | 30 | }, |
31 | 31 | { |
32 | | - name: 'firefox', |
33 | | - use: { ...devices['Desktop Firefox'] }, |
| 32 | + name: "firefox", |
| 33 | + use: { ...devices["Desktop Firefox"] }, |
34 | 34 | }, |
35 | 35 | { |
36 | | - name: 'webkit', |
37 | | - use: { ...devices['Desktop Safari'] }, |
| 36 | + name: "webkit", |
| 37 | + use: { ...devices["Desktop Safari"] }, |
38 | 38 | }, |
39 | 39 | /* Test against mobile viewports. */ |
40 | 40 | { |
41 | | - name: 'mobile-chrome', |
42 | | - use: { ...devices['Pixel 7'] }, |
| 41 | + name: "mobile-chrome", |
| 42 | + use: { ...devices["Pixel 7"] }, |
43 | 43 | }, |
44 | 44 | { |
45 | | - name: 'mobile-safari', |
46 | | - use: { ...devices['iPhone 14'] }, |
| 45 | + name: "mobile-safari", |
| 46 | + use: { ...devices["iPhone 14"] }, |
47 | 47 | }, |
48 | 48 | ], |
49 | 49 | /* Run web server for the tests */ |
50 | 50 | webServer: { |
51 | | - command: 'pnpm dev', |
52 | | - url: 'http://localhost:3000', |
| 51 | + command: "pnpm dev", |
| 52 | + url: "http://localhost:3000", |
53 | 53 | reuseExistingServer: !process.env.CI, |
54 | | - stdout: 'pipe', |
55 | | - stderr: 'pipe', |
| 54 | + stdout: "pipe", |
| 55 | + stderr: "pipe", |
56 | 56 | }, |
57 | 57 | }); |
0 commit comments