@public-ui/visual-tests 3.0.0-rc.2 → 3.0.0-rc.4

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": "3.0.0-rc.2",
3
+ "version": "3.0.0-rc.4",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": {
@@ -26,12 +26,12 @@
26
26
  "axe-playwright": "2.0.3",
27
27
  "portfinder": "1.0.32",
28
28
  "serve": "14.2.4",
29
- "@public-ui/sample-react": "3.0.0-rc.2"
29
+ "@public-ui/sample-react": "3.0.0-rc.4"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@babel/eslint-parser": "7.25.9",
33
33
  "@babel/plugin-syntax-import-attributes": "7.26.0",
34
- "@babel/preset-env": "7.26.0",
34
+ "@babel/preset-env": "7.26.7",
35
35
  "eslint": "8.57.1",
36
36
  "knip": "5.40.0",
37
37
  "prettier": "3.4.2"
@@ -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
  // {
@@ -105,7 +105,7 @@ ROUTES.set('card/basic', {
105
105
  skipFailures: false,
106
106
  },
107
107
  });
108
- ROUTES.set('combobox/basic', {
108
+ ROUTES.set('combobox/basic?noColumns', {
109
109
  axe: {
110
110
  skipFailures: false,
111
111
  },
@@ -174,22 +174,21 @@ ROUTES.set('image/basic', {
174
174
  skipFailures: false,
175
175
  },
176
176
  });
177
- ROUTES.set('input-checkbox/basic', null);
178
- ROUTES.set('input-checkbox/button', null);
179
- ROUTES.set('input-checkbox/switch', null);
180
- ROUTES.set('input-color/basic', null);
181
- ROUTES.set('input-date/basic', null);
182
- ROUTES.set('input-email/basic', null);
183
- ROUTES.set('input-file/basic', null);
184
- ROUTES.set('input-number/basic', null);
185
- ROUTES.set('input-password/basic', null);
186
- ROUTES.set('input-password/show-password', null);
187
- ROUTES.set('input-radio/basic', null);
188
- ROUTES.set('input-radio/horizontal', null);
189
- ROUTES.set('input-radio/object', null);
190
- ROUTES.set('input-range/basic', null);
191
- ROUTES.set('input-text/basic', null);
192
- ROUTES.set('input-text/focus', null);
177
+ ROUTES.set('input-checkbox/basic?noColumns', null);
178
+ ROUTES.set('input-checkbox/button?noColumns', null);
179
+ ROUTES.set('input-checkbox/switch?noColumns', null);
180
+ ROUTES.set('input-color/basic?noColumns', null);
181
+ ROUTES.set('input-date/basic?noColumns', null);
182
+ ROUTES.set('input-email/basic?noColumns', null);
183
+ ROUTES.set('input-file/basic?noColumns', null);
184
+ ROUTES.set('input-number/basic?noColumns', null);
185
+ ROUTES.set('input-password/basic?noColumns', null);
186
+ ROUTES.set('input-password/show-password?noColumns', null);
187
+ ROUTES.set('input-radio/basic?noColumns', null);
188
+ ROUTES.set('input-radio/horizontal?noColumns', null);
189
+ ROUTES.set('input-radio/object?noColumns', null);
190
+ ROUTES.set('input-range/basic?noColumns', null);
191
+ ROUTES.set('input-text/basic?noColumns', null);
193
192
  ROUTES.set('kolibri/basic', {
194
193
  axe: {
195
194
  skipFailures: false,
@@ -231,7 +230,12 @@ ROUTES.set('modal/basic?show-modal=true', {
231
230
  height: 600,
232
231
  },
233
232
  });
234
-
233
+ ROUTES.set('modal/basic?show-modal=true&variant=card', {
234
+ viewportSize: {
235
+ width: 1920,
236
+ height: 600,
237
+ },
238
+ });
235
239
  ROUTES.set('nav/aria-current', {
236
240
  axe: {
237
241
  skipFailures: false,
@@ -263,7 +267,7 @@ ROUTES.set('quote/block', {
263
267
  skipFailures: false,
264
268
  },
265
269
  });
266
- ROUTES.set('select/basic', null);
270
+ ROUTES.set('select/basic?noColumns', null);
267
271
  ROUTES.set('skip-nav/basic', {
268
272
  axe: {
269
273
  skipFailures: false,
@@ -274,7 +278,7 @@ ROUTES.set('spin/basic', {
274
278
  skipFailures: false,
275
279
  },
276
280
  });
277
- ROUTES.set('single-select/basic', {
281
+ ROUTES.set('single-select/basic?noColumns', {
278
282
  axe: {
279
283
  skipFailures: false,
280
284
  },
@@ -364,7 +368,7 @@ ROUTES.set('textarea/adjust-height', {
364
368
  skipFailures: false,
365
369
  },
366
370
  });
367
- ROUTES.set('textarea/basic', null);
371
+ ROUTES.set('textarea/basic?noColumns', null);
368
372
  ROUTES.set('textarea/resize', {
369
373
  axe: {
370
374
  skipFailures: false,