forked from 21gifts/app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
45 lines (44 loc) · 1.22 KB
/
Copy pathplaywright.config.ts
File metadata and controls
45 lines (44 loc) · 1.22 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
import { defineConfig, devices } from '@playwright/test';
/**
* Playwright end-to-end configuration.
*
* Runs against the standalone production server (`node .next/standalone/
* server.js`, the exact artifact the Docker image runs) so the smoke tests
* exercise what actually ships. Locally an already-running server on :3000 is
* reused; CI always builds and starts fresh.
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
reporter: 'list',
expect: {
toHaveScreenshot: {
animations: 'disabled',
caret: 'hide',
maxDiffPixelRatio: 0.01,
},
},
use: {
baseURL: 'http://localhost:3000',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'npm run build && npm run start:standalone',
url: 'http://localhost:3000/healthz',
reuseExistingServer: !process.env.CI,
timeout: 360_000,
env: {
...process.env,
HOSTNAME: '0.0.0.0',
// Deterministic API host so login e2e can intercept LUD-04 without
// calling the live api. Playwright routes fulfill `/auth/lnurl`.
NEXT_PUBLIC_API_URL: 'https://api.21gifts.test',
},
},
});