Skip to content

Conversation

@wswebcreation
Copy link
Member

Description

This PR improves the error message when a baseline image is missing and both autoSaveBaseline = false and alwaysSaveActualImage = false.

Changes

  • Improved error message: Added guidance in checkBaselineImageExists to suggest users set alwaysSaveActualImage to true if they need the actual image to create a baseline manually
  • Added test: Created a test to verify the improved error message is displayed correctly
  • Respects user choice: The current behavior is correct - when both flags are false, we respect the user's explicit configuration and don't save the actual image

Analysis

The current behavior is correct. When both autoSaveBaseline = false and alwaysSaveActualImage = false, we should respect the user's explicit configuration choice and not save the actual image. This is by design - the user has told the system not to save images in this scenario.

However, the error message could be more helpful by guiding users on how to adjust their configuration if they need the actual image to create a baseline manually.

Testing

  • ✅ All existing tests pass
  • ✅ New test verifies the improved error message
  • ✅ No breaking changes

Related Issue

Fixes #1098

…e false

- Improve error message in checkBaselineImageExists to provide guidance
  when alwaysSaveActualImage is false and baseline doesn't exist
- Add helpful message suggesting users set alwaysSaveActualImage to true
  if they need the actual image to create a baseline
- Add test to verify the improved error message
- Respect user's explicit configuration choice (both flags set to false)

Fixes #1098
@changeset-bot
Copy link

changeset-bot bot commented Jan 16, 2026

🦋 Changeset detected

Latest commit: 8414ffc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@wdio/image-comparison-core Patch
@wdio/visual-service Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wswebcreation wswebcreation merged commit 340fbe6 into main Jan 16, 2026
12 checks passed
@wswebcreation wswebcreation deleted the improve-error-message-missing-baseline branch January 16, 2026 05:55
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

Successfully merging this pull request may close these issues.

Improve error message when baseline is missing and both autoSaveBaseline and alwaysSaveActualImage are false

2 participants