-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
63 lines (62 loc) · 1.75 KB
/
Copy pathplaywright.config.ts
File metadata and controls
63 lines (62 loc) · 1.75 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { defineConfig } from '@playwright/test'
/*
* End-to-end tests. The `cli` project spawns `dist/index.js` (run `npm run
* build` first); only its render checks open a browser.
*
* npm run test:cli PR tier
* DEEP=1 npm run test:cli nightly tier: + xmllint and epubcheck
*
* The `server` project starts `dist/index.js serve` and exports through its
* HTTP API (NETWORK=1 adds the git import).
*
* The `webapp` project serves `dist/webapp/build` (run `npm run webapp:build`
* first) and exports through its UI (NETWORK=1 adds the GitHub import).
* `webapp-firefox` and `webapp-webkit` run the same file in those browsers.
*
* npm run test:all both builds, types, unit tests, cli + server + webapp
* npm run test:all:deep the same with DEEP=1 (+ epubcheck download)
*/
export default defineConfig({
testDir: 'tests/e2e',
outputDir: 'test-results',
// SCORM, epub, docx and pdf exports each launch their own Chrome
workers: 2,
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: 0,
// An export plus a full slide walk of the player
timeout: 5 * 60_000,
reporter: [['list'], ['html', { open: 'never' }]],
use: {
browserName: 'chromium',
headless: true,
},
projects: [
{
name: 'cli',
testMatch: 'cli.spec.ts',
},
{
name: 'server',
testMatch: 'server.spec.ts',
},
{
name: 'webapp',
testMatch: 'webapp.spec.ts',
},
{
name: 'desktop',
testMatch: 'desktop.spec.ts',
},
{
name: 'webapp-firefox',
testMatch: 'webapp.spec.ts',
use: { browserName: 'firefox' },
},
{
name: 'webapp-webkit',
testMatch: 'webapp.spec.ts',
use: { browserName: 'webkit' },
},
],
})