-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplaywright.config.js
More file actions
107 lines (99 loc) · 3.21 KB
/
Copy pathplaywright.config.js
File metadata and controls
107 lines (99 loc) · 3.21 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { defineConfig, devices } from '@playwright/test'
/**
* Playwright configuration for Nextcloud app e2e tests
*
* Two project groups:
* - parallel: tests that do NOT modify global state (run with multiple workers)
* - sequential-admin: tests that change admin settings / groups (1 worker, runs after parallel)
*
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
testDir: './tests/e2e',
// Maximum time one test can run for
timeout: 30 * 1000,
// Global setup to restore database snapshot before tests
globalSetup: './tests/e2e/setup/global-setup.js',
// Test execution settings
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
// Reporter configuration
reporter: [
['html'],
['list'],
],
// Shared settings for all tests
use: {
baseURL: process.env.NEXTCLOUD_URL || 'http://localhost:8080',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'on-first-retry',
},
projects: [
{
name: 'parallel',
use: { ...devices['Desktop Chrome'] },
testMatch: [
'1-basic.spec.js',
'2-appointment.spec.js',
'3-voting.spec.js',
'5-export.spec.js',
'7-ical-feed.spec.js',
'8-attachments.spec.js',
'9-recurrence.spec.js',
'10-series.spec.js',
'11-notification-option.spec.js',
'14-close-inquiry.spec.js',
'22-response-rescind.spec.js',
'24-close-nav-resort.spec.js',
'30-location.spec.js',
'checkin.spec.js',
],
fullyParallel: false, // tests within a file stay sequential
workers: process.env.CI ? 3 : 4,
},
{
name: 'sequential-admin',
use: { ...devices['Desktop Chrome'] },
testMatch: [
'4-admin-settings.spec.js',
'5-visibility-users.spec.js',
'6-visibility-groups.spec.js',
'12-calendar-import.spec.js',
'13-calendar-sync.spec.js',
'15-close-inquiry-permissions.spec.js',
'16-guests-integration.spec.js',
// 17-19 changed global state (admin preview, permissions for
// default-view) or rely on the widget's 10-item cap — parallel
// pollution makes them flaky.
'17-reminder-closed-state.spec.js',
'18-widget-relevance.spec.js',
'19-default-view.spec.js',
'20-summary-direct-user.spec.js',
// Toggles the instance-wide audit log on and off.
'23-audit-history.spec.js',
// Toggles the instance-wide planning feature on and off.
'25-scheduled-out.spec.js',
// Grants/revokes the respond_for_others permission.
'26-respond-on-behalf.spec.js',
// Enables the org calendar push and writes into a CalDAV calendar.
'27-org-calendar.spec.js',
// Restricts the create permission to a dedicated group.
'28-create-permission.spec.js',
// Restricts every response-visibility tier to admin.
'29-organizer-visibility.spec.js',
// Its afterAll wipes every appointment instance-wide, colliding with
// the parallel project's other files (2-appointment, 3-voting,
// 30-location, ...) mid-run.
'31-category.spec.js',
// Grants and revokes see_statistics instance-wide.
'32-statistics.spec.js',
],
fullyParallel: false,
workers: 1,
dependencies: ['parallel'],
},
],
// No `webServer` on purpose — see tests/e2e/README.md, "Why the server is a
// separate step".
})