-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.demo.config.ts
More file actions
48 lines (45 loc) · 1.51 KB
/
Copy pathplaywright.demo.config.ts
File metadata and controls
48 lines (45 loc) · 1.51 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
import './e2e/setup/load-env';
import { defineConfig, devices } from '@playwright/test';
import { defineBddConfig } from 'playwright-bdd';
// Demo config — produces 4 narrative video walkthroughs for the README.
// Shares step definitions with the QA suite under e2e/steps/, plus demo-only
// steps under e2e/demo/steps/. Generated test files go to a separate
// .features-gen-demo so they don't collide with the QA `bddgen` output.
const testDir = defineBddConfig({
features: 'e2e/demo/features/**/*.feature',
steps: ['e2e/steps/**/*.ts', 'e2e/demo/steps/**/*.ts'],
outputDir: '.features-gen-demo',
});
const slowMo = Number(process.env.DEMO_SLOWMO ?? 1200);
export default defineConfig({
testDir,
timeout: 180_000,
fullyParallel: false,
retries: 0,
workers: 1,
reporter: [['list'], ['./e2e/reporter.ts']],
use: {
// See playwright.config.ts for why 127.0.0.1 instead of localhost.
baseURL: process.env.BASE_URL ?? 'http://127.0.0.1:5173',
headless: true,
viewport: { width: 1440, height: 900 },
video: { mode: 'on', size: { width: 1440, height: 900 } },
launchOptions: { slowMo },
},
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: 1440, height: 900 },
video: { mode: 'on', size: { width: 1440, height: 900 } },
},
},
],
});