Skip to content

Commit bde36b7

Browse files
chore: release [skip ci] (#1183)
Co-authored-by: WebdriverIO Release Bot <bot@webdriver.io>
1 parent b194642 commit bde36b7

8 files changed

Lines changed: 212 additions & 104 deletions

File tree

.changeset/chore-dependency-updates.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

.changeset/fix-ignore-options-parity.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

packages/image-comparison-core/CHANGELOG.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,91 @@
11
# @wdio/image-comparison-core
22

3+
## 2.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+
389
## 2.0.1
490

591
### Patch Changes

packages/image-comparison-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wdio/image-comparison-core",
3-
"version": "2.0.1",
3+
"version": "2.1.0",
44
"author": "Wim Selles - wswebcreation",
55
"description": "Image comparison core module for @wdio/visual-service - WebdriverIO visual testing framework",
66
"keywords": [

packages/visual-reporter/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# @wdio/visual-reporter
22

3+
## 0.4.15
4+
5+
### Patch Changes
6+
7+
- b194642: chore: dependency updates
8+
9+
Updated dependencies to their latest compatible versions:
10+
11+
- `@wdio/visual-service`: `expect-webdriverio` to `^5.7.0`
12+
- `@wdio/visual-reporter`: `sharp` to `^0.35.3`
13+
- 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
14+
15+
No functional or API changes.
16+
17+
### Committers: 1
18+
19+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
20+
321
## 0.4.14
422

523
### Patch Changes

packages/visual-reporter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@wdio/visual-reporter",
33
"author": "Wim Selles - wswebcreation",
44
"description": "Visual Testing HTML Report for the @wdio/visual-service module",
5-
"version": "0.4.14",
5+
"version": "0.4.15",
66
"license": "MIT",
77
"homepage": "https://webdriver.io/docs/visual-testing",
88
"repository": {

packages/visual-service/CHANGELOG.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,110 @@
11
# @wdio/visual-service
22

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+
3108
## 10.0.1
4109

5110
### Patch Changes

packages/visual-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@wdio/visual-service",
33
"author": "Wim Selles - wswebcreation",
44
"description": "Image comparison / visual regression testing for WebdriverIO",
5-
"version": "10.0.1",
5+
"version": "10.1.0",
66
"license": "MIT",
77
"homepage": "https://webdriver.io/docs/visual-testing",
88
"repository": {

0 commit comments

Comments
 (0)