-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathplaywright.config.ts
42 lines (39 loc) · 1.02 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
import { devices, type PlaywrightTestConfig } from "@playwright/test";
/**
* @see {@link https://playwright.dev/docs/test-configuration}
*/
const config: PlaywrightTestConfig = {
testDir: "tests",
fullyParallel: true, // Run all tests in parallel.
workers: process.env.CI ? 1 : undefined, // Opt out of parallel tests on CI.
forbidOnly: !!process.env.CI, // Fail the build on CI if you accidentally left test.only in the source code.
retries: process.env.CI ? 1 : 0, // Retry on CI only.
use: {
baseURL: "http://localhost:5173",
},
projects: [
// {
// name: "setup",
// testMatch: /.*\.setup\.ts/,
// use: { ...devices["iPhone 13 Mini"] },
// },
{
name: "mobile",
use: {
...devices["iPhone 13 Mini"],
},
},
// {
// name: "desktop",
// use: {
// ...devices["Desktop Chrome"],
// },
// },
],
webServer: {
command: "npm run ui:dev",
port: 5173,
reuseExistingServer: !process.env.CI,
},
};
export default config;