kunai-runner 6.10.105 → 6.10.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kunai-runner",
3
- "version": "6.10.105",
3
+ "version": "6.10.106",
4
4
  "description": "High-performance Dataverse Playwright frontend testing framework and E2E automation scaffolding.",
5
5
  "directories": {
6
6
  "doc": "docs",
@@ -13,7 +13,6 @@
13
13
  "scripts/",
14
14
  "docs/",
15
15
  "playwright.config.js",
16
- "playwright.config.ts",
17
16
  "tsconfig.json",
18
17
  "tsconfig.build.json",
19
18
  ".env.example",
@@ -1,206 +0,0 @@
1
- import { defineConfig } from "@playwright/test";
2
- import fs from "fs";
3
- import path from "path";
4
- const process = (globalThis as any).process;
5
-
6
- // Derive the auth file path at config-load time so both the setup project
7
- // and the suite project reference the same per-endpoint, per-browser file.
8
- // We inline the slug logic here (rather than importing lib/auth-file.ts)
9
- // because playwright.config.ts is evaluated before TypeScript compilation.
10
- function authFilePath(browser: string): string {
11
- const url = (process.env.BASE_URL ?? "default").trim();
12
- const slug = url
13
- .replace(/^https?:\/\//, "")
14
- .replace(/\/$/, "")
15
- .replace(/[^a-z0-9]/gi, "-")
16
- .toLowerCase();
17
- return `playwright/.auth/${slug}-${browser}.json`;
18
- }
19
-
20
- const AUTH_CHROMIUM = authFilePath("chromium");
21
- const AUTH_FIREFOX = authFilePath("firefox");
22
- const AUTH_WEBKIT = authFilePath("webkit");
23
-
24
- /**
25
- * Load environment variables from .env at the repository root.
26
- * dotenv is a transitive dependency of @playwright/test — no extra install needed.
27
- */
28
- // eslint-disable-next-line @typescript-eslint/no-require-imports
29
- require("dotenv").config({ path: path.resolve(__dirname, ".env") });
30
-
31
- /**
32
- * See https://playwright.dev/docs/test-configuration.
33
- */
34
- export default defineConfig({
35
- testDir: "./tests/suite",
36
- timeout: 90000,
37
- /* All tests within a project run in strict sequence; projects themselves
38
- run one at a time because workers is 1. */
39
- workers: 1,
40
- fullyParallel: false,
41
- /* Reporter to use. See https://playwright.dev/docs/test-reporters */
42
- reporter: "html",
43
- /* Shared settings for all projects. See https://playwright.dev/docs/api/class-testoptions. */
44
- use: {
45
- headless: true,
46
-
47
- launchOptions: {
48
- slowMo: 2000,
49
- },
50
-
51
- // Sets the default viewport size for all tests
52
- viewport: { width: 1920, height: 1080 },
53
-
54
- /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
55
- trace: "on",
56
-
57
- /* Always collect video and screenshots, even when tests pass. See https://playwright.dev/docs/video-and-screenshots */
58
- video: {
59
- mode: "on",
60
- size: { width: 1920, height: 1080 },
61
- },
62
-
63
- screenshot: {
64
- mode: "on",
65
- fullPage: true,
66
- },
67
- },
68
-
69
- /* Configure the output directory for test artifacts such as screenshots, videos, traces, etc. */
70
- outputDir: "test-results/",
71
-
72
- /* Configure projects
73
- *
74
- * Execution order (workers: 1 → strictly sequential):
75
- *
76
- * preflight
77
- * → setup-chromium → suite-chromium
78
- * → setup-firefox → suite-firefox
79
- * → setup-webkit → suite-webkit
80
- *
81
- * "suite-firefox" declares a dependency on "suite-chromium" and
82
- * "suite-webkit" declares a dependency on "suite-firefox", which
83
- * enforces the Chromium → Firefox → WebKit ordering even if workers
84
- * is ever increased.
85
- */
86
- projects: [
87
- /* =========================================================
88
- 1. Preflight — Chromium, no auth required, @standard only.
89
- The test itself returns immediately when SKIP_PREFLIGHT=true.
90
- ========================================================= */
91
- {
92
- name: "preflight",
93
- testMatch: /suite\/01-preflight\.spec\.ts/,
94
- tsconfig: "./tests/suite/tsconfig.json",
95
- use: {
96
- browserName: "chromium",
97
- baseURL: process.env.BASE_URL,
98
- },
99
- },
100
-
101
- /* =========================================================
102
- 2a. Auth setup — Chromium
103
- ========================================================= */
104
- {
105
- name: "setup-chromium",
106
- testMatch: /suite\/auth\.setup\.ts/,
107
- tsconfig: "./tests/suite/tsconfig.json",
108
- use: {
109
- browserName: "chromium",
110
- baseURL: process.env.BASE_URL,
111
- ...(fs.existsSync(AUTH_CHROMIUM) && {
112
- storageState: AUTH_CHROMIUM,
113
- }),
114
- },
115
- dependencies: [],
116
- },
117
-
118
- /* =========================================================
119
- 2b. Auth setup — Firefox
120
- ========================================================= */
121
- {
122
- name: "setup-firefox",
123
- testMatch: /suite\/auth\.setup\.ts/,
124
- tsconfig: "./tests/suite/tsconfig.json",
125
- use: {
126
- browserName: "firefox",
127
- baseURL: process.env.BASE_URL,
128
- ...(fs.existsSync(AUTH_FIREFOX) && {
129
- storageState: AUTH_FIREFOX,
130
- }),
131
- },
132
- dependencies: [],
133
- },
134
-
135
- /* =========================================================
136
- 2c. Auth setup — WebKit (Safari)
137
- ========================================================= */
138
- {
139
- name: "setup-webkit",
140
- testMatch: /suite\/auth\.setup\.ts/,
141
- tsconfig: "./tests/suite/tsconfig.json",
142
- use: {
143
- browserName: "webkit",
144
- baseURL: process.env.BASE_URL,
145
- ...(fs.existsSync(AUTH_WEBKIT) && {
146
- storageState: AUTH_WEBKIT,
147
- }),
148
- },
149
- dependencies: [],
150
- },
151
-
152
- /* =========================================================
153
- 3a. Main test suite — Chromium
154
- Runs first. Firefox suite depends on this completing.
155
- ========================================================= */
156
- {
157
- name: "suite-chromium",
158
- testMatch: /suite\/(?!auth\.setup|01-preflight)\d+.*\.spec\.ts/,
159
- tsconfig: "./tests/suite/tsconfig.json",
160
- use: {
161
- browserName: "chromium",
162
- baseURL: process.env.BASE_URL,
163
- ...(fs.existsSync(AUTH_CHROMIUM) && {
164
- storageState: AUTH_CHROMIUM,
165
- }),
166
- },
167
- dependencies: ["setup-chromium"],
168
- },
169
-
170
- /* =========================================================
171
- 3b. Main test suite — Firefox
172
- Runs after Chromium suite completes.
173
- ========================================================= */
174
- {
175
- name: "suite-firefox",
176
- testMatch: /suite\/(?!auth\.setup|01-preflight)\d+.*\.spec\.ts/,
177
- tsconfig: "./tests/suite/tsconfig.json",
178
- use: {
179
- browserName: "firefox",
180
- baseURL: process.env.BASE_URL,
181
- ...(fs.existsSync(AUTH_FIREFOX) && {
182
- storageState: AUTH_FIREFOX,
183
- }),
184
- },
185
- dependencies: ["setup-firefox", "suite-chromium"],
186
- },
187
-
188
- /* =========================================================
189
- 3c. Main test suite — WebKit (Safari)
190
- Runs after Firefox suite completes.
191
- ========================================================= */
192
- {
193
- name: "suite-webkit",
194
- testMatch: /suite\/(?!auth\.setup|01-preflight)\d+.*\.spec\.ts/,
195
- tsconfig: "./tests/suite/tsconfig.json",
196
- use: {
197
- browserName: "webkit",
198
- baseURL: process.env.BASE_URL,
199
- ...(fs.existsSync(AUTH_WEBKIT) && {
200
- storageState: AUTH_WEBKIT,
201
- }),
202
- },
203
- dependencies: ["setup-webkit", "suite-firefox"],
204
- },
205
- ],
206
- });