Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message no longer readable in case of mismatch after update to 6.2.3 #679

Closed
P-Courteille opened this issue Dec 10, 2024 · 3 comments

Comments

@P-Courteille
Copy link

Environment (please complete the following information):

  • Node.js version: 22.11.0
  • NPM version: 10.9.1
  • Platform name and version: Android 11 (testing on native android app)
  • WebdriverIO version: 9.4.1
  • @wdio/visual-service version: 6.2.3
  • @wdio/mocha-framework version: 9.2.8
  • @wdio/local-runner version: 9.4.1
  • @wdio/globals version: 9.4.1
  • @wdio/cli version: 9.4.1
  • Appium version: 2.11.5
  • tsx version: 4.19.2

Config of WebdriverIO + @wdio/visual-service

services: [
        // your other services
        [
            "visual",
            {
                baselineFolder: path.join(process.cwd(), "onboard", "baseline"),
                formatImageName: "{tag}-{width}x{height}-{dpr}",
                screenshotPath: path.join(process.cwd(), "onboard", "output", "visual"),
                savePerInstance: true,
                clearRuntimeFolder: true,
            },
        ],

Describe the bug
After the update to 6.2.3, something seems to not working as expected in case of mismatch.
image


💡Look to be something wrong the output of 'compareResult' (the issue occurs during the processResult step of variable "potentialResult" in or with the parsing of "makeThrowingMatcher".

image


Expected behavior
A readable message like:
'Expected image to match with given asymmetric matcher but did not pass!\n'

Link:
Detected after #656 (comment)

@wswebcreation
Copy link
Member

Found the issue, will fix it and release a new version, it will now throw this error

Error: Instance "androidDevice":
Expected image mismatch percentage to be at most 0%, but was 0.238%.
If this is acceptable, you may need to adjust the threshold or update the baseline image if the changes are intentional.

Baseline: /Users/wimselles/Git/wdio/issues/issue-656/myProject/baseline/pixel_8_pro_android_15_api_35/FullScreen-1344x2992-3.png
Actual Screenshot: /Users/wimselles/Git/wdio/issues/issue-656/myProject/output/visual/actual/pixel_8_pro_android_15_api_35/FullScreen-1344x2992-3.png
Difference: /Users/wimselles/Git/wdio/issues/issue-656/myProject/output/visual/diff/pixel_8_pro_android_15_api_35/FullScreen-1344x2992-3.png

For guidance on handling visual discrepancies, refer to: https://webdriver.io/docs/api/visual-regression.html

@wswebcreation
Copy link
Member

@P-Courteille
Copy link
Author

Thanks @wswebcreation, have a nice day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants