@wdio/visual-service 8.0.3 → 8.0.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # @wdio/visual-service
2
2
 
3
+ ## 8.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - d88d8dd: Optimize Mobile and Emulated device support
8
+
9
+ ## 🐛 Bugfixes
10
+
11
+ ### #969 Fix layer injection on mobile devices
12
+
13
+ On some devices the layer injection, to determine the exact position of the webview, was failing. It exceeded the appium timeout and returned an error like
14
+
15
+ ```logs
16
+ [1] [0-0] 2025-05-23T08:04:11.788Z INFO webdriver: COMMAND getUrl()
17
+ [1] [0-0] 2025-05-23T08:04:11.789Z INFO webdriver: [GET] https://hub-cloud.browserstack.com/wd/hub/session/xxxxx/url
18
+ [1] [0-0] 2025-05-23T08:04:12.036Z INFO webdriver: RESULT about:blank
19
+ [1] [0-0] 2025-05-23T08:04:12.038Z INFO webdriver: COMMAND navigateTo("data:text/html;base64,CiAgICAgICAgPG .... LONG LIST OF CHARACTERS=")
20
+ [1] [0-0] 2025-05-23T08:04:12.038Z INFO webdriver: [POST] https://hub-cloud.browserstack.com/wd/hub/session/xxxx/url
21
+ [1] [0-0] 2025-05-23T08:04:12.038Z INFO webdriver: DATA {
22
+ [1] [0-0] url: 'data:text/html;base64,CiAgICAgICAgPGh0bWw.... LONG LIST OF CHARACTERS='
23
+ [1] [0-0] }
24
+ [1] [0-0] 2025-05-23T08:05:42.132Z ERROR @wdio/utils:shim: Error: WebDriverError: The operation was aborted due to timeout when running "url" with method "POST" and args "{"url":"data:text/html;base64,CiAgICAgICAgPGh0b.... LONG LIST OF CHARACTERS="}"
25
+ [1] [0-0] at FetchRequest._libRequest (file:///xxxxxxx/node_modules/webdriver/build/node.js:1836:13)
26
+ [1] [0-0] 2025-05-23T08:05:42.132Z DEBUG @wdio/utils:shim: Finished to run "before" hook in 91147ms
27
+ [1] [0-0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
28
+ [1] [0-0] at async FetchRequest._request (file:///C:/xxxxxx/node_modules/webdriver/build/node.js:1846:20)
29
+ [1] [0-0] at Browser.wrapCommandFn (c:/Projects/xxxxxx/node_modules/@wdio/utils/build/index.js:907:23)
30
+ [1] [0-0] at Browser.url (c:/Projects/xxxxxxx/node_modules/webdriverio/build/node.js:5682:3)
31
+ [1] [0-0] at Browser.wrapCommandFn (c:/Projects/xxxxxx/node_modules/@wdio/utils/build/index.js:907:23)
32
+ [1] [0-0] at async loadBase64Html (file:///C:/Projects/xxxxxx/node_modules/webdriver-image-comparison/dist/helpers/utils.js:377:5)
33
+ [1] [0-0] at async getMobileViewPortPosition (file:///C:/Projects/xxxxxx/node_modules/webdriver-image-comparison/dist/helpers/utils.js:417:9)
34
+ [1] [0-0] at async getMobileInstanceData (file:///C:/Projects/xxxxxx/node_modules/@wdio/visual-service/dist/utils.js:58:28)
35
+ [1] [0-0] at async getInstanceData (file:///C:/Projects/xxxxxxx/node_modules/@wdio/visual-service/dist/utils.js:189:77)
36
+ [1] [0-0] 2025-05-23T08:05:42.144Z INFO @wdio/browserstack-service: Update job with sessionId xxxxx
37
+ ```
38
+
39
+ This was caused by the `await url(`data:text/html;base64,${base64Html}`)` that injected the layer. Some browsers couldn't handle the `data:text/html;base64`.
40
+
41
+ We now fixed that with a different injection. It was tested on Android/iOS and on Sims/Emus/Real Devices and it worked
42
+
43
+ ### Improve determining if a device is emulated
44
+
45
+ In a previous release we added a function to determine if a device was emulated. This resulted in incorrect screen sizes that were used for the files names for devices. This caused or failing baselines, or new files to be created because the screen sizes were not available
46
+ We now improved the check and the correct screen sizes are added again to the file names and made sure that the previous generated base line could be used again.
47
+
48
+ ## Committers: 1
49
+
50
+ - Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
51
+
52
+ - Updated dependencies [d88d8dd]
53
+ - webdriver-image-comparison@9.0.4
54
+
3
55
  ## 8.0.3
4
56
 
5
57
  ### Patch 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": "8.0.3",
5
+ "version": "8.0.4",
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.4.4",
25
25
  "@wdio/types": "^9.14.0",
26
26
  "expect-webdriverio": "^5.1.0",
27
- "webdriver-image-comparison": "9.0.3"
27
+ "webdriver-image-comparison": "9.0.4"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "run-s clean build:*",