-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[🐛 Bug]: WebdriverIO toMatchSnapshot does not fail tests on mocha test retries #12882
Comments
@Winify We need a repository with a reproducible example. Your example and repro steps work well for me.
|
Thanks for raising this issue 🙏 Unfortunately we can't help you without a reproducible example in this matter. Please read our contributing guidelines on how to create a reproducible example. If you can't provide a reproducible example we will close this issue in 7 days. If you have any questions please reach out to us on our Discord channel. We are happy to help you out there. |
@BorisOsipov Thank you for the swift response, And I apologize, because as I created a repro example project.... it actually works as expected. All in all, thank you so much |
Thanks @Winify , let us know if you are able to reproduce this one, then I am happy to re-open and take a look. |
@Winify There is only one strange thing that I suspect - |
@BorisOsipov You are right! I am using mocha retries:
In the repro project I emitted this config, as I did not think it was neccessary. If I remove the RETRIES=1 config from the env file, it fails as expected! |
Thanks for reporting! We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers! |
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
8.36.1
Node.js Version
v20.9.0
Mode
WDIO Testrunner
Which capabilities are you using?
No response
What happened?
When utilizing the
toMatchSnapshot
expectation in WebdriverIO, it is observed that the test run does not fail as expected when the snapshot does not match the current state of the tested element property.This behavior is inconsistent with the intended functionality of snapshot testing, where a test should fail if there are discrepancies between the actual output and the stored snapshot.
The test run passes, despite the discrepancy between the snapshot and the current output, with a console log:
Snapshot Summary:
1 snapshot(s) unmatched.
What is your expected behavior?
The test run should fail, indicating that the snapshot does not match the current property.
How to reproduce the bug.
Relevant log output
Code of Conduct
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: