@wdio/visual-service 9.3.0 → 10.0.1
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/CHANGELOG.md +69 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,65 @@
|
|
|
1
1
|
# @wdio/visual-service
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 10.0.1
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8cbb294: fix: wire ignoreAntialiasing to pixelmatch AA forgiveness toggle
|
|
8
|
+
|
|
9
|
+
In v10 the pixelmatch engine always ran with anti-aliasing forgiveness enabled, even when `ignoreAntialiasing` was `false`. The option had no effect on comparison behaviour.
|
|
10
|
+
|
|
11
|
+
**What changed**
|
|
6
12
|
|
|
7
|
-
-
|
|
13
|
+
- `ignoreAntialiasing` now toggles pixelmatch's AA handling: `true` forgives anti-aliased pixels, `false` counts them as mismatches.
|
|
14
|
+
- The default is now `ignoreAntialiasing: true`, matching the forgiving pixelmatch behaviour users already get in v10.
|
|
15
|
+
- `ignoreLess` and `ignoreNothing` keep their own threshold behaviour; AA forgiveness is controlled independently via `ignoreAntialiasing`.
|
|
16
|
+
|
|
17
|
+
**Migration**
|
|
18
|
+
|
|
19
|
+
- No action needed if you rely on the current forgiving defaults, comparison behaviour stays the same.
|
|
20
|
+
- If you explicitly set `ignoreAntialiasing: true` today, that remains redundant but harmless.
|
|
21
|
+
- Set `ignoreAntialiasing: false` when you need strict comparison where anti-aliased pixels count as differences.
|
|
22
|
+
|
|
23
|
+
### Committers: 1
|
|
24
|
+
|
|
25
|
+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [8cbb294]
|
|
28
|
+
- @wdio/image-comparison-core@2.0.1
|
|
29
|
+
|
|
30
|
+
## 10.0.0
|
|
31
|
+
|
|
32
|
+
### Major Changes
|
|
33
|
+
|
|
34
|
+
- d2758ce: ### 💥 Breaking change: new image comparison engine
|
|
35
|
+
|
|
36
|
+
We replaced the engine that powers every visual comparison. This is a breaking change, so please read the migration note below before upgrading.
|
|
37
|
+
|
|
38
|
+
**The problem**
|
|
39
|
+
|
|
40
|
+
Visual tests were flaky. Tests failed on differences that are impossible to see by eye, like sub-pixel font rendering, 1px anti-aliasing on edges and small shadow shifts between runs. The old engine (resemble.js) compared raw RGB values, which does not match how human vision works, and on larger screenshots it quietly skipped about a third of the pixels. So you got failures that were not real, and in some cases real changes that could slip through.
|
|
41
|
+
|
|
42
|
+
On top of that, all the image handling (decode, crop, composite, rotate, resize) ran through [`jimp`](https://github.com/jimp-dev/jimp), a large dependency that we only used a small slice of and that is no longer actively maintained.
|
|
43
|
+
|
|
44
|
+
**The solution**
|
|
45
|
+
|
|
46
|
+
Two things changed under the hood:
|
|
47
|
+
|
|
48
|
+
1. The comparison engine is now [pixelmatch](https://github.com/mapbox/pixelmatch). It compares images the way the eye perceives them (in the YIQ colour space) and detects anti-aliasing by checking both images at once. Invisible rendering noise now passes, and real regressions still fail.
|
|
49
|
+
2. `jimp` has been removed completely. PNG decode and encode now go through the small [`fast-png`](https://github.com/image-js/fast-png) library, and the handful of image operations we still need (crop, composite, canvas, opacity, rotate, resize) live in a tiny internal helper. The bundled resemble file is gone too. The net effect is a much lighter dependency footprint with no loss in functionality.
|
|
50
|
+
|
|
51
|
+
**What you need to do**
|
|
52
|
+
|
|
53
|
+
- Your public API does not change. `checkScreen`, `checkElement`, `checkFullPageScreen` and the matchers all work exactly as before, and the same `ignore` options are supported.
|
|
54
|
+
- Because the new engine measures differences differently, mismatch percentages will not match the old numbers exactly. You should re-run your suite once and re-accept your baselines so they are generated with the new engine. After that your tests should be noticeably more stable.
|
|
55
|
+
|
|
56
|
+
**Also fixed in this release**
|
|
57
|
+
|
|
58
|
+
- **Top-row artifact on full page screenshots:** Jimp's `contain()` centred the image, shifting content by 1px and creating a false diff across the top row. Replaced with buffer-level padding that anchors content at (0,0).
|
|
59
|
+
- **Ignored region 1px under-coverage:** The device-pixel size of an ignored region used `Math.floor`, which could drop a pixel when `cssSize * DPR` had a fractional part. Width and height now use `Math.ceil` so the full element is always covered. Position still uses `Math.floor`.
|
|
60
|
+
- **Comparison sensitivity matches what you were used to:** Switching engines meant retuning how strict a comparison is. The pixelmatch threshold is now aligned with the old resemble tolerances, so a difference that used to fail still fails and one that used to pass still passes. The diff highlight also uses a single consistent colour instead of varying per run.
|
|
61
|
+
- **Different image sizes no longer crash the comparison:** When a baseline and the actual screenshot had slightly different dimensions, the old flow threw an error and you lost the result. Both images are now normalised to the same size before they are compared, so a size change is reported as a visual difference you can review instead of a hard failure.
|
|
62
|
+
- **More reliable ignore regions with WebDriver BiDi:** With BiDi the calculated element bounds can be off by a pixel or two, which sometimes left part of an ignored element just outside the ignored area and caused a false diff. The BiDi emulated flow now uses a larger `ignoreRegionPadding` so the whole element stays covered.
|
|
8
63
|
|
|
9
64
|
### Committers: 1
|
|
10
65
|
|
|
@@ -12,8 +67,17 @@
|
|
|
12
67
|
|
|
13
68
|
### Patch Changes
|
|
14
69
|
|
|
15
|
-
-
|
|
16
|
-
|
|
70
|
+
- 6cd5742: ### Dependency updates
|
|
71
|
+
|
|
72
|
+
Updated dependencies across all packages to their latest compatible versions. This includes the WebdriverIO toolchain (`webdriverio`, `@wdio/*`) to `9.29.1`, the TypeScript ESLint plugins to `8.62.0`, Vitest to `3.2.6`, and various other packages such as `sharp`, `@remix-run/*`, `fuse.js` and `expect-webdriverio`. There are no functional or API changes.
|
|
73
|
+
|
|
74
|
+
### Committers: 1
|
|
75
|
+
|
|
76
|
+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
|
|
77
|
+
|
|
78
|
+
- Updated dependencies [d2758ce]
|
|
79
|
+
- Updated dependencies [6cd5742]
|
|
80
|
+
- @wdio/image-comparison-core@2.0.0
|
|
17
81
|
|
|
18
82
|
## 9.2.4
|
|
19
83
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@wdio/visual-service",
|
|
3
3
|
"author": "Wim Selles - wswebcreation",
|
|
4
4
|
"description": "Image comparison / visual regression testing for WebdriverIO",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "10.0.1",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://webdriver.io/docs/visual-testing",
|
|
8
8
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@wdio/logger": "^9.29.1",
|
|
25
25
|
"@wdio/types": "^9.29.1",
|
|
26
26
|
"expect-webdriverio": "^5.6.9",
|
|
27
|
-
"@wdio/image-comparison-core": "
|
|
27
|
+
"@wdio/image-comparison-core": "2.0.1"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "run-s clean build:*",
|