@public-ui/visual-tests 2.2.8 → 3.0.0-638ed75dd472d3e3ad4c1c3a3c72d705e6022731.0
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/README.md +6 -2
- package/package.json +2 -2
- package/playwright.config.js +4 -0
- package/tests/sample-app.routes.js +25 -55
- package/tests/theme-snapshots.spec.js +1 -0
package/README.md
CHANGED
|
@@ -48,8 +48,12 @@ Add the following npm scripts to the theme's `package.json`:
|
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
### Environment variables
|
|
52
|
+
|
|
53
|
+
- `THEME_MODULE`: Define the relative path to the TypeScript module containing the theme definitions. Without file extension.
|
|
54
|
+
- `THEME_EXPERT`: Define the name of the export within the module. (e.g., `export const THEME_NAME = {/**/};`) Defaults to `default`.
|
|
55
|
+
- `KOLIBRI_VISUAL_TESTS_TIMEOUT`: Define the Playwright [test timeout](https://playwright.dev/docs/test-timeouts).
|
|
56
|
+
- `KOLIBRI_VISUAL_TESTS_EXPECT_TIMEOUT`: Define the Playwright [expect timeout](https://playwright.dev/docs/test-timeouts).
|
|
53
57
|
|
|
54
58
|
Run the tests with `npm test`. The first time, this will create a new folder `snapshots` which is supposed to be committed to the repository.
|
|
55
59
|
In the following runs, new screenshots will be compared to this reference.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/visual-tests",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-638ed75dd472d3e3ad4c1c3a3c72d705e6022731.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"axe-playwright": "2.1.0",
|
|
30
30
|
"portfinder": "1.0.35",
|
|
31
31
|
"serve": "14.2.4",
|
|
32
|
-
"@public-ui/sample-react": "
|
|
32
|
+
"@public-ui/sample-react": "3.0.0-638ed75dd472d3e3ad4c1c3a3c72d705e6022731.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/eslint-parser": "7.26.10",
|
package/playwright.config.js
CHANGED
|
@@ -36,6 +36,10 @@ export default defineConfig({
|
|
|
36
36
|
trace: 'on-first-retry',
|
|
37
37
|
},
|
|
38
38
|
|
|
39
|
+
expect: {
|
|
40
|
+
timeout: process.env.KOLIBRI_VISUAL_TESTS_EXPECT_TIMEOUT ? Number(process.env.KOLIBRI_VISUAL_TESTS_EXPECT_TIMEOUT) : undefined,
|
|
41
|
+
},
|
|
42
|
+
|
|
39
43
|
/* Configure projects for major browsers */
|
|
40
44
|
projects: [
|
|
41
45
|
// {
|
|
@@ -53,11 +53,6 @@ ROUTES.set('breadcrumb/basic', {
|
|
|
53
53
|
skipFailures: false,
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
|
-
ROUTES.set('button-group/basic', {
|
|
57
|
-
axe: {
|
|
58
|
-
skipFailures: false,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
56
|
ROUTES.set('button-link/basic', {
|
|
62
57
|
axe: {
|
|
63
58
|
skipFailures: false,
|
|
@@ -108,7 +103,7 @@ ROUTES.set('card/basic', {
|
|
|
108
103
|
skipFailures: false,
|
|
109
104
|
},
|
|
110
105
|
});
|
|
111
|
-
ROUTES.set('combobox/basic', {
|
|
106
|
+
ROUTES.set('combobox/basic?noColumns', {
|
|
112
107
|
axe: {
|
|
113
108
|
skipFailures: false,
|
|
114
109
|
},
|
|
@@ -177,27 +172,21 @@ ROUTES.set('image/basic', {
|
|
|
177
172
|
skipFailures: false,
|
|
178
173
|
},
|
|
179
174
|
});
|
|
180
|
-
ROUTES.set('
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
ROUTES.set('input-
|
|
186
|
-
ROUTES.set('input-
|
|
187
|
-
ROUTES.set('input-
|
|
188
|
-
ROUTES.set('input-
|
|
189
|
-
ROUTES.set('input-
|
|
190
|
-
ROUTES.set('input-
|
|
191
|
-
ROUTES.set('input-
|
|
192
|
-
ROUTES.set('input-
|
|
193
|
-
ROUTES.set('input-
|
|
194
|
-
ROUTES.set('input-
|
|
195
|
-
ROUTES.set('input-radio/basic', null);
|
|
196
|
-
ROUTES.set('input-radio/horizontal', null);
|
|
197
|
-
ROUTES.set('input-radio/object', null);
|
|
198
|
-
ROUTES.set('input-range/basic', null);
|
|
199
|
-
ROUTES.set('input-text/basic', null);
|
|
200
|
-
ROUTES.set('input-text/focus', null);
|
|
175
|
+
ROUTES.set('input-checkbox/basic?noColumns', null);
|
|
176
|
+
ROUTES.set('input-checkbox/button?noColumns', null);
|
|
177
|
+
ROUTES.set('input-checkbox/switch?noColumns', null);
|
|
178
|
+
ROUTES.set('input-color/basic?noColumns', null);
|
|
179
|
+
ROUTES.set('input-date/basic?noColumns', null);
|
|
180
|
+
ROUTES.set('input-email/basic?noColumns', null);
|
|
181
|
+
ROUTES.set('input-file/basic?noColumns', null);
|
|
182
|
+
ROUTES.set('input-number/basic?noColumns', null);
|
|
183
|
+
ROUTES.set('input-password/basic?noColumns', null);
|
|
184
|
+
ROUTES.set('input-password/show-password?noColumns', null);
|
|
185
|
+
ROUTES.set('input-radio/basic?noColumns', null);
|
|
186
|
+
ROUTES.set('input-radio/horizontal?noColumns', null);
|
|
187
|
+
ROUTES.set('input-radio/object?noColumns', null);
|
|
188
|
+
ROUTES.set('input-range/basic?noColumns', null);
|
|
189
|
+
ROUTES.set('input-text/basic?noColumns', null);
|
|
201
190
|
ROUTES.set('kolibri/basic', {
|
|
202
191
|
axe: {
|
|
203
192
|
skipFailures: false,
|
|
@@ -208,16 +197,6 @@ ROUTES.set('link-button/basic', {
|
|
|
208
197
|
skipFailures: false,
|
|
209
198
|
},
|
|
210
199
|
});
|
|
211
|
-
ROUTES.set('link-group/basic', {
|
|
212
|
-
axe: {
|
|
213
|
-
skipFailures: false,
|
|
214
|
-
},
|
|
215
|
-
});
|
|
216
|
-
ROUTES.set('link-group/horizontal', {
|
|
217
|
-
axe: {
|
|
218
|
-
skipFailures: false,
|
|
219
|
-
},
|
|
220
|
-
});
|
|
221
200
|
ROUTES.set('link/basic', {
|
|
222
201
|
axe: {
|
|
223
202
|
skipFailures: false,
|
|
@@ -249,7 +228,12 @@ ROUTES.set('modal/basic?show-modal=true', {
|
|
|
249
228
|
height: 600,
|
|
250
229
|
},
|
|
251
230
|
});
|
|
252
|
-
|
|
231
|
+
ROUTES.set('modal/basic?show-modal=true&variant=card', {
|
|
232
|
+
viewportSize: {
|
|
233
|
+
width: 1920,
|
|
234
|
+
height: 600,
|
|
235
|
+
},
|
|
236
|
+
});
|
|
253
237
|
ROUTES.set('nav/aria-current', {
|
|
254
238
|
axe: {
|
|
255
239
|
skipFailures: false,
|
|
@@ -281,7 +265,7 @@ ROUTES.set('quote/block', {
|
|
|
281
265
|
skipFailures: false,
|
|
282
266
|
},
|
|
283
267
|
});
|
|
284
|
-
ROUTES.set('select/basic', null);
|
|
268
|
+
ROUTES.set('select/basic?noColumns', null);
|
|
285
269
|
ROUTES.set('skip-nav/basic', {
|
|
286
270
|
axe: {
|
|
287
271
|
skipFailures: false,
|
|
@@ -292,7 +276,7 @@ ROUTES.set('spin/basic', {
|
|
|
292
276
|
skipFailures: false,
|
|
293
277
|
},
|
|
294
278
|
});
|
|
295
|
-
ROUTES.set('single-select/basic', {
|
|
279
|
+
ROUTES.set('single-select/basic?noColumns', {
|
|
296
280
|
axe: {
|
|
297
281
|
skipFailures: false,
|
|
298
282
|
},
|
|
@@ -382,7 +366,7 @@ ROUTES.set('textarea/adjust-height', {
|
|
|
382
366
|
skipFailures: false,
|
|
383
367
|
},
|
|
384
368
|
});
|
|
385
|
-
ROUTES.set('textarea/basic', null);
|
|
369
|
+
ROUTES.set('textarea/basic?noColumns', null);
|
|
386
370
|
ROUTES.set('textarea/resize', {
|
|
387
371
|
axe: {
|
|
388
372
|
skipFailures: false,
|
|
@@ -496,11 +480,6 @@ ROUTES.set('version/context', {
|
|
|
496
480
|
skipFailures: false,
|
|
497
481
|
},
|
|
498
482
|
});
|
|
499
|
-
ROUTES.set('scenarios/appointment-form', {
|
|
500
|
-
axe: {
|
|
501
|
-
skipFailures: false,
|
|
502
|
-
},
|
|
503
|
-
});
|
|
504
483
|
ROUTES.set('scenarios/static-form', {
|
|
505
484
|
axe: {
|
|
506
485
|
skipFailures: false,
|
|
@@ -511,15 +490,6 @@ ROUTES.set('scenarios/disabled-interactive-scenario', {
|
|
|
511
490
|
skipFailures: false,
|
|
512
491
|
},
|
|
513
492
|
});
|
|
514
|
-
ROUTES.set('scenarios/same-height-of-all-interactive-elements', {
|
|
515
|
-
axe: {
|
|
516
|
-
skipFailures: false,
|
|
517
|
-
},
|
|
518
|
-
viewportSize: {
|
|
519
|
-
width: 4000,
|
|
520
|
-
height: 0,
|
|
521
|
-
},
|
|
522
|
-
});
|
|
523
493
|
|
|
524
494
|
/* Focus tests */
|
|
525
495
|
ROUTES.set('scenarios/focus-elements?component=accordion');
|