-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
44 lines (42 loc) · 1.45 KB
/
Copy pathplaywright.config.ts
File metadata and controls
44 lines (42 loc) · 1.45 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
import './e2e/setup/load-env';
import { defineConfig, devices } from '@playwright/test';
import { defineBddConfig } from 'playwright-bdd';
const testDir = defineBddConfig({
features: 'e2e/features/**/*.feature',
steps: 'e2e/steps/**/*.ts',
});
export default defineConfig({
testDir,
timeout: 30_000,
fullyParallel: false,
retries: 1,
reporter: [['list'], ['./e2e/reporter.ts']],
// Sweep demo_signup_<ts>@studysprint.app users created by the registration
// scenario. Best-effort — see e2e/setup/teardown.ts for the no-secret-key
// bail-out path.
globalTeardown: './e2e/setup/teardown.ts',
use: {
// 127.0.0.1 is intentional — `localhost` resolves to ::1 (IPv6) first on
// macOS, and Vite binds IPv4 only by default, so any other app already
// listening on ::1:5173 wins the lookup race.
baseURL: process.env.BASE_URL ?? 'http://127.0.0.1:5173',
headless: true,
viewport: { width: 1280, height: 720 },
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
// Auto-start the Vite dev server when no BASE_URL is provided.
// Backend is now Supabase (managed) — no local API process to launch.
webServer: process.env.BASE_URL ? undefined : {
command: 'deno task dev',
url: 'http://127.0.0.1:5173',
reuseExistingServer: true,
timeout: 30_000,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], viewport: { width: 1280, height: 720 } },
},
],
});