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
|
import { defineConfig, devices } from "@playwright/test";
const port = Number(process.env.E2E_PORT || 4173);
const host = process.env.E2E_HOST || "127.0.0.1";
const baseURL = process.env.E2E_BASE_URL || `http://${host}:${port}`;
const slowMo = Number(process.env.E2E_SLOWMO || 0);
export default defineConfig({
testDir: "./test/e2e",
timeout: 30_000,
expect: {
timeout: 10_000,
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [["list"]],
use: {
baseURL,
trace: "on-first-retry",
launchOptions: slowMo > 0 ? { slowMo } : undefined,
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
testIgnore: /ark/,
},
{
// Ark tests share the server wallet and must run serially
name: "chromium-ark",
use: { ...devices["Desktop Chrome"] },
testMatch: /ark/,
fullyParallel: false,
},
],
webServer: process.env.E2E_SKIP_WEBSERVER
? undefined
: {
command: `PUBLIC_RECAPTCHA_SITE_KEY= bunx vite dev --host ${host} --port ${port}`,
url: baseURL,
reuseExistingServer: true,
stdout: "pipe",
stderr: "pipe",
},
});
|