-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
49 lines (46 loc) · 1.25 KB
/
Copy pathplaywright.config.ts
File metadata and controls
49 lines (46 loc) · 1.25 KB
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
import { defineConfig, devices } from "@playwright/test";
import { readLocalSupabaseEnvironment } from "./scripts/read-local-supabase-env";
const baseURL = "http://127.0.0.1:3100";
const supabaseEnvironment = readLocalSupabaseEnvironment();
Object.assign(process.env, supabaseEnvironment, {
NEXT_PUBLIC_MAC_AUTH_URL: baseURL,
NEXT_PUBLIC_SITE_URL: baseURL,
});
export default defineConfig({
forbidOnly: Boolean(process.env.CI),
fullyParallel: false,
globalSetup: "./tests/e2e/global-setup.ts",
projects: [
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
...(process.platform === "win32" && !process.env.CI
? { channel: "chrome" }
: {}),
},
},
],
reporter: process.env.CI ? "github" : "list",
retries: process.env.CI ? 1 : 0,
testDir: "./tests/e2e",
timeout: 30_000,
use: {
baseURL,
screenshot: "only-on-failure",
trace: "retain-on-failure",
},
webServer: {
command: "npm run dev -- --hostname 127.0.0.1 --port 3100",
env: {
...process.env,
...supabaseEnvironment,
NEXT_PUBLIC_MAC_AUTH_URL: baseURL,
NEXT_PUBLIC_SITE_URL: baseURL,
},
reuseExistingServer: false,
timeout: 120_000,
url: baseURL,
},
workers: 1,
});