forked from nextcloud/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
69 lines (65 loc) · 1.68 KB
/
Copy pathplaywright.config.ts
File metadata and controls
69 lines (65 loc) · 1.68 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
64
65
66
67
68
69
/*
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { defineConfig, devices } from '@playwright/test'
export default defineConfig({
testDir: './tests/playwright/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
workers: process.env.CI ? 1 : undefined,
timeout: process.env.CI ? 45_000 : undefined, // on CI allow 1.5x the default timeout to compensate for shared server resources
reporter: process.env.CI ? [['blob'], ['dot'], ['github']] : 'html',
use: {
baseURL: 'http://localhost:8042/index.php/',
trace: 'on-first-retry',
},
projects: [
{
// Installation-wizard tests. They un-install and re-install the shared
// server, so they must never run alongside other tests
name: 'setup',
fullyParallel: false,
workers: 1,
grep: /@setup/,
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'admin-settings',
fullyParallel: false,
workers: 1, // only one admin setting test can run at a time due to shared state
testMatch: '**/admin-settings*.spec.ts',
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'default',
testMatch: /\/(?!admin-settings)[^/]*\.spec\.ts$/,
grepInvert: /@setup/,
use: {
...devices['Desktop Chrome'],
},
},
],
webServer: {
command: 'node tests/playwright/start-nextcloud-server.js',
env: {
NEXTCLOUD_PORT: '8042',
},
stderr: 'pipe',
stdout: 'pipe',
gracefulShutdown: {
signal: 'SIGTERM',
timeout: 10_000,
},
reuseExistingServer: !process.env.CI,
timeout: 300_000,
wait: {
stdout: /Nextcloud container ready to run Playwright tests/,
},
},
})