-
Notifications
You must be signed in to change notification settings - Fork 435
/
playwright.config.ts
53 lines (48 loc) · 1.35 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
import path from "node:path"
import { defineConfig, devices } from "@playwright/test"
import dotenv from "dotenv"
dotenv.config({ path: path.resolve(__dirname, ".env.local") })
const baseURL = process.env.DEPLOYMENT_URL || "http://localhost:3000"
// biome-ignore lint/style/noDefaultExport: <explanation>
export default defineConfig({
testDir: "./playwright",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: 2,
workers: 3,
reporter: "html",
outputDir: "playwright/results/",
use: {
baseURL,
trace: "on-first-retry",
},
projects: [
{
name: "auth-setup",
testMatch: /auth\.setup\.ts/,
use: {
...devices["Desktop Chrome"],
userAgent: `${devices["Desktop Chrome"].userAgent} GUILD_E2E`,
},
},
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
userAgent: `${devices["Desktop Chrome"].userAgent} GUILD_E2E`,
},
dependencies: ["auth-setup"],
},
],
webServer: [
{
command: `anvil --fork-url=${process.env.ANVIL_FORK_URL} --fork-block-number=6697000 -m='${process.env.NEXT_PUBLIC_E2E_WALLET_MNEMONIC}' --balance=1 --fork-header='Authorization: ${process.env.ANVIL_FORK_KEY}'`,
port: 8545,
},
{
command: process.env.CI ? "" : "npm run start",
url: baseURL,
reuseExistingServer: true,
},
],
})