@public-ui/visual-tests 2.2.11 → 3.0.0-0a564237c37a5d1ca12470bdd73e4ea1eac06982.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 CHANGED
@@ -48,8 +48,12 @@ Add the following npm scripts to the theme's `package.json`:
48
48
  }
49
49
  ```
50
50
 
51
- - `THEME_MODULE` defines the relative path to the TypeScript module containing the the theme definitions. Without file extension.
52
- - `THEME_EXPERT` defines the name of the export within the the module. (e.g., `export const THEME_NAME = {/**/};`) Defaults to `default`.
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": "2.2.11",
3
+ "version": "3.0.0-0a564237c37a5d1ca12470bdd73e4ea1eac06982.0",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": {
@@ -25,18 +25,18 @@
25
25
  "kolibri-visual-test": "src/index.js"
26
26
  },
27
27
  "dependencies": {
28
- "@playwright/test": "1.52.0",
28
+ "@playwright/test": "1.49.1",
29
29
  "axe-playwright": "2.1.0",
30
- "portfinder": "1.0.37",
30
+ "portfinder": "1.0.35",
31
31
  "serve": "14.2.4",
32
- "@public-ui/sample-react": "2.2.11"
32
+ "@public-ui/sample-react": "3.0.0-0a564237c37a5d1ca12470bdd73e4ea1eac06982.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@babel/eslint-parser": "7.27.1",
36
- "@babel/plugin-syntax-import-attributes": "7.27.1",
37
- "@babel/preset-env": "7.27.2",
35
+ "@babel/eslint-parser": "7.26.10",
36
+ "@babel/plugin-syntax-import-attributes": "7.26.0",
37
+ "@babel/preset-env": "7.26.9",
38
38
  "eslint": "8.57.1",
39
- "knip": "5.56.0",
39
+ "knip": "5.46.0",
40
40
  "prettier": "3.5.3"
41
41
  },
42
42
  "files": [
@@ -48,7 +48,6 @@
48
48
  "format": "prettier --check src",
49
49
  "lint": "pnpm lint:eslint",
50
50
  "lint:eslint": "eslint src",
51
- "unused": "knip",
52
- "postinstall": "pnpm exec playwright install"
51
+ "unused": "knip"
53
52
  }
54
53
  }
@@ -89,11 +89,6 @@ ROUTES.set('breadcrumb/basic', {
89
89
  skip: true,
90
90
  },
91
91
  });
92
- ROUTES.set('button-group/basic', {
93
- snapshot: {
94
- skip: true,
95
- },
96
- });
97
92
  ROUTES.set('button-link/basic', {
98
93
  snapshot: {
99
94
  skip: true,
@@ -168,7 +163,7 @@ ROUTES.set('card/basic', {
168
163
  },
169
164
  },
170
165
  });
171
- ROUTES.set('combobox/basic', {
166
+ ROUTES.set('combobox/basic?noColumns', {
172
167
  snapshot: {
173
168
  skip: true,
174
169
  },
@@ -281,16 +276,9 @@ ROUTES.set('image/basic', {
281
276
  zoom: {
282
277
  skip: true,
283
278
  },
284
- },
285
- });
286
- ROUTES.set('indented-text/basic', {
287
- snapshot: {
288
- zoom: {
289
- skip: true,
290
- },
291
279
  },
292
280
  });
293
- ROUTES.set('input-checkbox/basic', {
281
+ ROUTES.set('input-checkbox/basic?noColumns', {
294
282
  axe: {
295
283
  skipFailures: true,
296
284
  },
@@ -304,7 +292,7 @@ ROUTES.set('input-checkbox/basic', {
304
292
  },
305
293
  },
306
294
  });
307
- ROUTES.set('input-checkbox/button', {
295
+ ROUTES.set('input-checkbox/button?noColumns', {
308
296
  axe: {
309
297
  skipFailures: true,
310
298
  },
@@ -318,7 +306,7 @@ ROUTES.set('input-checkbox/button', {
318
306
  },
319
307
  },
320
308
  });
321
- ROUTES.set('input-checkbox/switch', {
309
+ ROUTES.set('input-checkbox/switch?noColumns', {
322
310
  axe: {
323
311
  skipFailures: true,
324
312
  },
@@ -332,7 +320,7 @@ ROUTES.set('input-checkbox/switch', {
332
320
  },
333
321
  },
334
322
  });
335
- ROUTES.set('input-color/basic', {
323
+ ROUTES.set('input-color/basic?noColumns', {
336
324
  snapshot: {
337
325
  viewportSize: {
338
326
  width: 500,
@@ -343,7 +331,7 @@ ROUTES.set('input-color/basic', {
343
331
  },
344
332
  },
345
333
  });
346
- ROUTES.set('input-date/basic', {
334
+ ROUTES.set('input-date/basic?noColumns', {
347
335
  snapshot: {
348
336
  viewportSize: {
349
337
  width: 500,
@@ -354,7 +342,7 @@ ROUTES.set('input-date/basic', {
354
342
  },
355
343
  },
356
344
  });
357
- ROUTES.set('input-email/basic', {
345
+ ROUTES.set('input-email/basic?noColumns', {
358
346
  snapshot: {
359
347
  viewportSize: {
360
348
  width: 500,
@@ -365,7 +353,7 @@ ROUTES.set('input-email/basic', {
365
353
  },
366
354
  },
367
355
  });
368
- ROUTES.set('input-file/basic', {
356
+ ROUTES.set('input-file/basic?noColumns', {
369
357
  snapshot: {
370
358
  viewportSize: {
371
359
  width: 500,
@@ -376,7 +364,7 @@ ROUTES.set('input-file/basic', {
376
364
  },
377
365
  },
378
366
  });
379
- ROUTES.set('input-number/basic', {
367
+ ROUTES.set('input-number/basic?noColumns', {
380
368
  snapshot: {
381
369
  viewportSize: {
382
370
  width: 500,
@@ -387,7 +375,7 @@ ROUTES.set('input-number/basic', {
387
375
  },
388
376
  },
389
377
  });
390
- ROUTES.set('input-password/basic', {
378
+ ROUTES.set('input-password/basic?noColumns', {
391
379
  snapshot: {
392
380
  viewportSize: {
393
381
  width: 500,
@@ -398,7 +386,7 @@ ROUTES.set('input-password/basic', {
398
386
  },
399
387
  },
400
388
  });
401
- ROUTES.set('input-password/show-password', {
389
+ ROUTES.set('input-password/show-password?noColumns', {
402
390
  snapshot: {
403
391
  viewportSize: {
404
392
  width: 500,
@@ -409,7 +397,7 @@ ROUTES.set('input-password/show-password', {
409
397
  },
410
398
  },
411
399
  });
412
- ROUTES.set('input-radio/basic', {
400
+ ROUTES.set('input-radio/basic?noColumns', {
413
401
  axe: {
414
402
  skipFailures: true,
415
403
  },
@@ -423,7 +411,7 @@ ROUTES.set('input-radio/basic', {
423
411
  },
424
412
  },
425
413
  });
426
- ROUTES.set('input-radio/horizontal', {
414
+ ROUTES.set('input-radio/horizontal?noColumns', {
427
415
  snapshot: {
428
416
  viewportSize: {
429
417
  width: 500,
@@ -434,7 +422,7 @@ ROUTES.set('input-radio/horizontal', {
434
422
  },
435
423
  },
436
424
  });
437
- ROUTES.set('input-radio/object', {
425
+ ROUTES.set('input-radio/object?noColumns', {
438
426
  snapshot: {
439
427
  viewportSize: {
440
428
  width: 500,
@@ -445,7 +433,7 @@ ROUTES.set('input-radio/object', {
445
433
  },
446
434
  },
447
435
  });
448
- ROUTES.set('input-range/basic', {
436
+ ROUTES.set('input-range/basic?noColumns', {
449
437
  snapshot: {
450
438
  viewportSize: {
451
439
  width: 500,
@@ -456,10 +444,7 @@ ROUTES.set('input-range/basic', {
456
444
  },
457
445
  },
458
446
  });
459
- ROUTES.set('input-text/basic', {
460
- axe: {
461
- skipFailures: true,
462
- },
447
+ ROUTES.set('input-text/basic?noColumns', {
463
448
  snapshot: {
464
449
  viewportSize: {
465
450
  width: 500,
@@ -469,9 +454,6 @@ ROUTES.set('input-text/basic', {
469
454
  skip: true,
470
455
  },
471
456
  },
472
- });
473
- ROUTES.set('input-text/focus', {
474
-
475
457
  });
476
458
  ROUTES.set('kolibri/basic', {
477
459
  snapshot: {
@@ -486,16 +468,6 @@ ROUTES.set('link-button/basic', {
486
468
  skip: true,
487
469
  },
488
470
  });
489
- ROUTES.set('link-group/basic', {
490
- snapshot: {
491
- skip: true,
492
- },
493
- });
494
- ROUTES.set('link-group/horizontal', {
495
- snapshot: {
496
- skip: true,
497
- },
498
- });
499
471
  ROUTES.set('link/basic', {
500
472
  snapshot: {
501
473
  zoom: {
@@ -540,6 +512,17 @@ ROUTES.set('modal/basic?show-modal=true', {
540
512
  },
541
513
  },
542
514
  });
515
+ ROUTES.set('modal/basic?show-modal=true&variant=card', {
516
+ snapshot: {
517
+ viewportSize: {
518
+ width: 1920,
519
+ height: 600,
520
+ },
521
+ zoom: {
522
+ skip: true,
523
+ },
524
+ },
525
+ });
543
526
  ROUTES.set('nav/aria-current', {
544
527
  snapshot: {
545
528
  skip: true,
@@ -592,7 +575,7 @@ ROUTES.set('quote/block', {
592
575
  },
593
576
  },
594
577
  });
595
- ROUTES.set('select/basic', {
578
+ ROUTES.set('select/basic?noColumns', {
596
579
  snapshot: {
597
580
  viewportSize: {
598
581
  width: 500,
@@ -622,7 +605,7 @@ ROUTES.set('spin/basic', {
622
605
  },
623
606
  },
624
607
  });
625
- ROUTES.set('single-select/basic', {
608
+ ROUTES.set('single-select/basic?noColumns', {
626
609
  axe: {
627
610
  skipFailures: true,
628
611
  },
@@ -774,7 +757,7 @@ ROUTES.set('textarea/adjust-height', {
774
757
  },
775
758
  },
776
759
  });
777
- ROUTES.set('textarea/basic', {
760
+ ROUTES.set('textarea/basic?noColumns', {
778
761
  snapshot: {
779
762
  viewportSize: {
780
763
  width: 500,
@@ -946,7 +929,7 @@ ROUTES.set('toast/basic?type=error&variant=msg', {
946
929
  ROUTES.set('toolbar/basic', {
947
930
  snapshot: {
948
931
  viewportSize: {
949
- width: 300,
932
+ width: 600,
950
933
  height: 100,
951
934
  },
952
935
  zoom: {
@@ -982,7 +965,7 @@ ROUTES.set('tree/basic/home', {
982
965
  ROUTES.set('version/basic', {
983
966
  snapshot: {
984
967
  viewportSize: {
985
- width: 100,
968
+ width: 150,
986
969
  height: 100,
987
970
  },
988
971
  zoom: {
@@ -998,17 +981,6 @@ ROUTES.set('version/context', {
998
981
  },
999
982
  },
1000
983
  });
1001
- ROUTES.set('scenarios/appointment-form', {
1002
- axe: {
1003
- skipFailures: true,
1004
- },
1005
- snapshot: {
1006
- skip: true,
1007
- zoom: {
1008
- skip: true,
1009
- },
1010
- },
1011
- });
1012
984
  ROUTES.set('scenarios/static-form', {
1013
985
  axe: {
1014
986
  skipFailures: true,
@@ -18,6 +18,7 @@ const DEFAULT_SNAPSHOT_OPTIONS = {
18
18
  fullPage: true,
19
19
  maxDiffPixelRatio: 0,
20
20
  scale: 'css', // 'css' or 'device'
21
+ timeout: 10000,
21
22
  };
22
23
 
23
24
  ROUTES.forEach((options, route) => {