@wdio/visual-service 10.0.0 → 10.1.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/CHANGELOG.md +132 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,137 @@
|
|
|
1
1
|
# @wdio/visual-service
|
|
2
2
|
|
|
3
|
+
## 10.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b194642: fix: ignore\* option parity with resemble (pixelmatch)
|
|
8
|
+
|
|
9
|
+
After v10 switched to pixelmatch, the public `ignore*` API did not fully match resemble.js preset behaviour. Combined modes such as `ignoreLess` with the default `ignoreAntialiasing: true` still inherited AA forgiveness, and `ignoreColors` used BT.601 grayscale instead of resemble brightness-only comparison.
|
|
10
|
+
|
|
11
|
+
This release also adds `compareOptions.pixelmatch` so you can pass pixelmatch settings directly instead of using `ignore*` presets.
|
|
12
|
+
|
|
13
|
+
**What changed**
|
|
14
|
+
|
|
15
|
+
- Multiple `ignore*` flags now follow resemble last-wins ordering (`ignoreAlpha` → `ignoreAntialiasing` → `ignoreColors` → `ignoreLess` → `ignoreNothing`) instead of composing independently
|
|
16
|
+
- `ignoreLess`, `ignoreAlpha`, `ignoreColors`, and `ignoreNothing` now apply their own threshold and AA rules when active; they no longer inherit default `ignoreAntialiasing: true` forgiveness
|
|
17
|
+
- `ignoreColors` now compares brightness only using resemble luma weights (`0.3/0.59/0.11`), matching resemble v9 behaviour
|
|
18
|
+
- WDIO logs a warning when multiple `ignore*` flags are enabled, naming which preset wins
|
|
19
|
+
- New `compareOptions.pixelmatch` object for direct pixelmatch control (`threshold`, `includeAA`, `diffColor`, `aaColor`, `diffColorAlt`, `alpha`, `diffMask`, `checkerboard`)
|
|
20
|
+
|
|
21
|
+
**Preset reference**
|
|
22
|
+
|
|
23
|
+
| Active preset | threshold | AA forgiven |
|
|
24
|
+
| ------------------------------ | --------- | -------------------- |
|
|
25
|
+
| `ignoreNothing` | 0 | no |
|
|
26
|
+
| `ignoreLess` | ~16/255 | no |
|
|
27
|
+
| `ignoreColors` | ~16/255 | no (brightness only) |
|
|
28
|
+
| `ignoreAlpha` | ~16/255 | no |
|
|
29
|
+
| `ignoreAntialiasing` (default) | ~32/255 | yes |
|
|
30
|
+
|
|
31
|
+
**Using `compareOptions.pixelmatch`**
|
|
32
|
+
|
|
33
|
+
Set it in your service config or on a single `check*` call. Do not put `ignore*` keys and `pixelmatch` on the same options object; that throws, even when an `ignore*` flag is `false`. Service config and method options are separate objects, so a method call can override the service compare mode for that check (a warning is logged when the mode switches).
|
|
34
|
+
|
|
35
|
+
Service config:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
// wdio.conf.js
|
|
39
|
+
services: [
|
|
40
|
+
[
|
|
41
|
+
"visual",
|
|
42
|
+
{
|
|
43
|
+
compareOptions: {
|
|
44
|
+
pixelmatch: {
|
|
45
|
+
threshold: 0.063,
|
|
46
|
+
includeAA: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
];
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Method override when the service uses `ignore*` presets:
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
await browser.checkScreen("homepage", {
|
|
58
|
+
pixelmatch: { threshold: 0.05 },
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Method override when the service uses `pixelmatch`:
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
await browser.checkScreen("homepage", {
|
|
66
|
+
ignoreLess: true,
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Invalid (throws):
|
|
71
|
+
|
|
72
|
+
```js
|
|
73
|
+
compareOptions: {
|
|
74
|
+
ignoreLess: false,
|
|
75
|
+
pixelmatch: { threshold: 0.063 },
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
See [pixelmatch](https://github.com/mapbox/pixelmatch) for option details.
|
|
80
|
+
|
|
81
|
+
**What you need to do**
|
|
82
|
+
|
|
83
|
+
- No change needed if you use a single `ignore*` flag or rely on defaults (`ignoreAntialiasing: true`)
|
|
84
|
+
- Set `ignoreAntialiasing: false` when anti-aliased pixels should count as differences
|
|
85
|
+
- If you combine multiple `ignore*` flags, review your tests; last-wins ordering now matches resemble v9
|
|
86
|
+
- If you use `ignoreColors`, results may differ slightly from early v10 but align with resemble v9
|
|
87
|
+
- To tune pixelmatch directly, add `compareOptions.pixelmatch` in your service config or pass `pixelmatch` on individual `check*` calls
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- b194642: chore: dependency updates
|
|
92
|
+
|
|
93
|
+
Updated dependencies to their latest compatible versions:
|
|
94
|
+
|
|
95
|
+
- `@wdio/visual-service`: `expect-webdriverio` to `^5.7.0`
|
|
96
|
+
- `@wdio/visual-reporter`: `sharp` to `^0.35.3`
|
|
97
|
+
- Dev tooling: `@typescript-eslint/*` to `^8.63.0`, `vitest` to `^3.2.7`, `eslint` to `^9.39.5`, plus minor bumps for `postcss`, `react-icons`, and `isbot` in the reporter package
|
|
98
|
+
|
|
99
|
+
No functional or API changes.
|
|
100
|
+
|
|
101
|
+
### Committers: 1
|
|
102
|
+
|
|
103
|
+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [b194642]
|
|
106
|
+
- @wdio/image-comparison-core@2.1.0
|
|
107
|
+
|
|
108
|
+
## 10.0.1
|
|
109
|
+
|
|
110
|
+
### Patch Changes
|
|
111
|
+
|
|
112
|
+
- 8cbb294: fix: wire ignoreAntialiasing to pixelmatch AA forgiveness toggle
|
|
113
|
+
|
|
114
|
+
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.
|
|
115
|
+
|
|
116
|
+
**What changed**
|
|
117
|
+
|
|
118
|
+
- `ignoreAntialiasing` now toggles pixelmatch's AA handling: `true` forgives anti-aliased pixels, `false` counts them as mismatches.
|
|
119
|
+
- The default is now `ignoreAntialiasing: true`, matching the forgiving pixelmatch behaviour users already get in v10.
|
|
120
|
+
- `ignoreLess` and `ignoreNothing` keep their own threshold behaviour; AA forgiveness is controlled independently via `ignoreAntialiasing`.
|
|
121
|
+
|
|
122
|
+
**Migration**
|
|
123
|
+
|
|
124
|
+
- No action needed if you rely on the current forgiving defaults, comparison behaviour stays the same.
|
|
125
|
+
- If you explicitly set `ignoreAntialiasing: true` today, that remains redundant but harmless.
|
|
126
|
+
- Set `ignoreAntialiasing: false` when you need strict comparison where anti-aliased pixels count as differences.
|
|
127
|
+
|
|
128
|
+
### Committers: 1
|
|
129
|
+
|
|
130
|
+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
|
|
131
|
+
|
|
132
|
+
- Updated dependencies [8cbb294]
|
|
133
|
+
- @wdio/image-comparison-core@2.0.1
|
|
134
|
+
|
|
3
135
|
## 10.0.0
|
|
4
136
|
|
|
5
137
|
### Major Changes
|
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": "10.
|
|
5
|
+
"version": "10.1.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://webdriver.io/docs/visual-testing",
|
|
8
8
|
"repository": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@wdio/globals": "^9.29.1",
|
|
24
24
|
"@wdio/logger": "^9.29.1",
|
|
25
25
|
"@wdio/types": "^9.29.1",
|
|
26
|
-
"expect-webdriverio": "^5.
|
|
27
|
-
"@wdio/image-comparison-core": "2.
|
|
26
|
+
"expect-webdriverio": "^5.7.0",
|
|
27
|
+
"@wdio/image-comparison-core": "2.1.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "run-s clean build:*",
|