-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.docs.config.ts
More file actions
51 lines (49 loc) · 1.91 KB
/
Copy pathplaywright.docs.config.ts
File metadata and controls
51 lines (49 loc) · 1.91 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
/*
* SPDX-FileCopyrightText: 2026 LaunchPad Contributors
* SPDX-License-Identifier: EUPL-1.2
*
* Documentation capture, on purpose and on demand:
*
* npm run test:e2e:docs
*
* `tests/e2e/docs-screenshots.spec.ts` reshoots the tutorial screenshots into
* `docs/screenshots/tutorials/{user,admin}/`. It is a capture job, not a
* regression suite — a red run here means a screenshot did not get taken, not
* that the product broke — so it must not sit in the suite that gates a PR.
*
* WHY IT IS A SEPARATE FILE RATHER THAN A SECOND PROJECT IN
* `playwright.config.ts`. It used to be a `docs-capture` project there, which
* looked tidy and had one consequence nobody had measured: since
* `.github#308`, gate-19 counts a spec as live if ANY project in
* `playwright.config.ts` would run it. A project whose whole purpose is "do
* not run this in CI" therefore keeps handing gate-19 the file's coverage
* credit. Moving it to a config gate-19 does not read (it looks only for
* `playwright.config.{ts,js,mts,cjs}`) makes the exclusion mean what it says.
*
* This file carries no `@e2e` annotations today, so the move costs no
* coverage — it removes a mechanism that would have hidden some later.
*/
import { defineConfig, devices } from '@playwright/test'
import * as path from 'path'
import { BASE_URL as baseURL } from './tests/e2e/support/baseUrl'
export default defineConfig({
testDir: './tests/e2e',
testMatch: /docs-screenshots\.spec\.ts$/,
fullyParallel: false,
workers: 1,
retries: 0,
timeout: 90_000,
expect: { timeout: 10_000 },
reporter: 'list',
globalSetup: path.resolve(__dirname, 'tests/e2e/global-setup.ts'),
use: {
baseURL,
storageState: path.resolve(__dirname, 'tests/e2e/.auth/admin.json'),
viewport: { width: 1280, height: 800 },
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
actionTimeout: 10_000,
navigationTimeout: 60_000,
...devices['Desktop Chrome'],
},
})