@wdio/visual-service 4.1.3 → 5.0.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +57 -3
  2. package/package.json +7 -6
package/CHANGELOG.md CHANGED
@@ -1,13 +1,67 @@
1
1
  # @wdio/visual-service
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 66b9f11: # 💥 Breaking
8
+
9
+ This PR replaces Canvas as a dependency with Jimp. This removes the need to use system dependencies and will reduce the number of system dependency errors/issues (node-gyp/canvas and so on). This will, in the end, make the life of our end users way easier due to:
10
+
11
+ - less errors
12
+ - less complex test environments
13
+
14
+ > [!note]
15
+ > Extensive research has been done and we have chosen to "fork" ResembleJS, adjust it by making use of Jimp instead of Canvas and break the browser API because the fork will only be used in a nodejs environment
16
+ > Investigation showed that creating a wrapper would even make it slower, so we went for the breaking change in the API by just replacing Canvas with Jimp
17
+
18
+ > [!important]
19
+ > There is a performance impact where Canvas is around 70% faster than Jimp. This has been measured without using WebdriverIO and only comparing images. When the "old" implementation with WebdriverIO combined with Canvas or Jimp is compared, we hardly see a performance impact.
20
+
21
+ # 🚀 New Features
22
+
23
+ Update the baseline images through the command line by adding the argument `--update-visual-baseline`. This will
24
+
25
+ - automatically copy the actual take screenshot and put it in the baseline folder
26
+ - if there are differences it will let the test pass because the baseline has been updated
27
+
28
+ **Usage:**
29
+
30
+ ```sh
31
+ npm run test.local.desktop --update-visual-baseline
32
+ ```
33
+
34
+ When running logs info/debug mode you will see the following logs added
35
+
36
+ ```logs
37
+ [0-0] ..............
38
+ [0-0] #####################################################################################
39
+ [0-0] INFO:
40
+ [0-0] Updated the actual image to
41
+ [0-0] /Users/wswebcreation/Git/wdio/visual-testing/localBaseline/chromel/demo-chrome-1366x768.png
42
+ [0-0] #####################################################################################
43
+ [0-0] ..........
44
+ ```
45
+
46
+ # 💅 Polish
47
+
48
+ - remove Vitest fix
49
+ - add app images
50
+ - update the build
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [66b9f11]
55
+ - webdriver-image-comparison@6.0.0
56
+
3
57
  ## 4.1.3
4
58
 
5
59
  ### Patch Changes
6
60
 
7
- # 🐛 Bug Fixes
61
+ # 🐛 Bug Fixes
8
62
 
9
- - Fixes https://github.com/webdriverio/visual-testing/issues/286
10
- - Fixes https://github.com/webdriverio/visual-testing/issues/333
63
+ - Fixes https://github.com/webdriverio/visual-testing/issues/286
64
+ - Fixes https://github.com/webdriverio/visual-testing/issues/333
11
65
 
12
66
  ## 4.1.2
13
67
 
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": "4.1.3",
5
+ "version": "5.0.0",
6
6
  "license": "MIT",
7
7
  "homepage": "https://webdriver.io/docs/visual-testing",
8
8
  "repository": {
@@ -20,16 +20,17 @@
20
20
  "type": "module",
21
21
  "types": "./dist/index.d.ts",
22
22
  "dependencies": {
23
- "@wdio/globals": "^8.36.1",
24
- "@wdio/logger": "^8.28.0",
25
- "@wdio/types": "^8.36.1",
23
+ "@wdio/globals": "^8.38.2",
24
+ "@wdio/logger": "^8.38.0",
25
+ "@wdio/types": "^8.38.2",
26
26
  "node-fetch": "^3.3.2",
27
- "webdriver-image-comparison": "^5.1.0"
27
+ "webdriver-image-comparison": "^6.0.0"
28
28
  },
29
+ "devDependencies": {},
29
30
  "scripts": {
30
31
  "build": "run-s clean build:*",
31
32
  "build:tsc": "tsc --project ./tsconfig.json",
32
- "clean": "rimraf coverage build .tmp",
33
+ "clean": "rimraf coverage dist .tmp",
33
34
  "watch": "pnpm run build:tsc -w"
34
35
  }
35
36
  }