-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
45 lines (43 loc) · 1.12 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
import { defineConfig, devices } from "@playwright/test";
import { devices as replayDevices, replayReporter } from "@replayio/playwright";
import dotenv from "dotenv";
import { resolve } from "path";
// Read environment variables from file.
// https://github.com/motdotla/dotenv
dotenv.config({ path: resolve(__dirname, ".env.local") });
// See https://playwright.dev/docs/test-configuration.
export default defineConfig({
testDir: "./tests",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: [
process.env.CI ? (["dot"] as const) : (["line"] as const),
process.env.RECORD
? replayReporter({
apiKey: process.env.REPLAY_API_KEY,
upload: true,
})
: null,
].filter((v): v is NonNullable<typeof v> => !!v),
timeout: 10_000,
use: {
launchOptions: {
// ...
},
viewport: {
width: 1280,
height: 1024,
},
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "replay-chromium",
use: { ...replayDevices["Replay Chromium"] },
},
],
});