Releases: webdriverio/visual-testing
@wdio/visual-service@9.1.4
Patch Changes
-
a3bc7a4: ## #1115 Respect
alwaysSaveActualImage: falseforcheckScreenmethodsWhen using visual matchers like
toMatchScreenSnapshot('tag', 0.9)withalwaysSaveActualImage: false, the actual image was still being saved even when the comparison passed within the threshold.The root cause was that the matcher's expected threshold was not being passed to the core comparison logic. The core used
saveAboveTolerance(defaulting to 0) to decide whether to save images, while the matcher used the user-provided threshold to determine pass/fail - these were disconnected.This fix ensures:
- When
alwaysSaveActualImage: falseandsaveAboveToleranceis not explicitly set, actual images are never saved (respecting the literal meaning of the option) - When
saveAboveToleranceis explicitly set (like matchers do internally), actual images are saved only when the mismatch exceeds that threshold
Committers: 1
- Wim Selles (@wswebcreation)
- When
-
a3bc7a4: ## Fix:
save*methods now always save files regardless ofalwaysSaveActualImagesettingPreviously, when
alwaysSaveActualImage: falsewas set in the configuration,save*methods (saveScreen,saveElement,saveFullPageScreen,saveAppScreen,saveAppElement) were not saving files to disk, causing test failures.The
alwaysSaveActualImageoption is intended to control whether actual images are saved duringcheck*methods (comparison operations), notsave*methods. Sincesave*methods are explicitly designed to save screenshots, they should always save files regardless of this setting.This fix ensures:
save*methods always save files to disk, even whenalwaysSaveActualImage: falseis set in the configalwaysSaveActualImage: falsecontinues to work correctly forcheck*methods (as intended for issue #1115)- The behavior is now consistent:
save*= always save,check*= respectalwaysSaveActualImagesetting
Implementation details:
- The visual service overrides
alwaysSaveActualImage: truewhen callingsave*methods directly from the browser API save*methods respect whateveralwaysSaveActualImagevalue is passed to them (no special logic needed)check*methods pass through the config value (which may befalse), sosave*methods respect it when called internally- This clean separation ensures
save*methods work correctly when called directly while still respectingalwaysSaveActualImageforcheck*methods
Committers: 1
- Wim Selles (@wswebcreation)
-
Updated dependencies [a3bc7a4]
-
Updated dependencies [a3bc7a4]
- @wdio/image-comparison-core@1.1.3
@wdio/image-comparison-core@1.1.3
Patch Changes
-
a3bc7a4: ## #1115 Respect
alwaysSaveActualImage: falseforcheckScreenmethodsWhen using visual matchers like
toMatchScreenSnapshot('tag', 0.9)withalwaysSaveActualImage: false, the actual image was still being saved even when the comparison passed within the threshold.The root cause was that the matcher's expected threshold was not being passed to the core comparison logic. The core used
saveAboveTolerance(defaulting to 0) to decide whether to save images, while the matcher used the user-provided threshold to determine pass/fail - these were disconnected.This fix ensures:
- When
alwaysSaveActualImage: falseandsaveAboveToleranceis not explicitly set, actual images are never saved (respecting the literal meaning of the option) - When
saveAboveToleranceis explicitly set (like matchers do internally), actual images are saved only when the mismatch exceeds that threshold
Committers: 1
- Wim Selles (@wswebcreation)
- When
-
a3bc7a4: ## Fix:
save*methods now always save files regardless ofalwaysSaveActualImagesettingPreviously, when
alwaysSaveActualImage: falsewas set in the configuration,save*methods (saveScreen,saveElement,saveFullPageScreen,saveAppScreen,saveAppElement) were not saving files to disk, causing test failures.The
alwaysSaveActualImageoption is intended to control whether actual images are saved duringcheck*methods (comparison operations), notsave*methods. Sincesave*methods are explicitly designed to save screenshots, they should always save files regardless of this setting.This fix ensures:
save*methods always save files to disk, even whenalwaysSaveActualImage: falseis set in the configalwaysSaveActualImage: falsecontinues to work correctly forcheck*methods (as intended for issue #1115)- The behavior is now consistent:
save*= always save,check*= respectalwaysSaveActualImagesetting
Implementation details:
- The visual service overrides
alwaysSaveActualImage: truewhen callingsave*methods directly from the browser API save*methods respect whateveralwaysSaveActualImagevalue is passed to them (no special logic needed)check*methods pass through the config value (which may befalse), sosave*methods respect it when called internally- This clean separation ensures
save*methods work correctly when called directly while still respectingalwaysSaveActualImageforcheck*methods
Committers: 1
- Wim Selles (@wswebcreation)
@wdio/visual-service@9.1.3
Patch Changes
-
2a518ff: # 🐛 Bugfixes
#1111 Pass matcher threshold to core as saveAboveTolerance
When using visual matchers like
toMatchScreenSnapshot('tag', 0.9)withalwaysSaveActualImage: false, the actual image was still being saved even when the comparison passed within the threshold.The root cause was that the matcher's expected threshold was not being passed to the core comparison logic. The core used
saveAboveTolerance(defaulting to 0) to decide whether to save images, while the matcher used the user-provided threshold to determine pass/fail - these were disconnected.This fix ensures the matcher passes the expected threshold to the core as
saveAboveTolerance, so images are only saved when the mismatch actually exceeds the user's acceptable threshold.Committers: 1
- Wim Selles (@wswebcreation)
@wdio/visual-service@9.1.2
Patch Changes
-
0a2b6d0: ## #1111 Respect saveAboveTolerance when deciding to save actual images when alwaysSaveActualImage is false.
When
alwaysSaveActualImageisfalse, the actual image is no longer written to disk if the mismatch is below the configured tolerance, avoiding extra actuals when the comparison still passes.Committers: 1
- Wim Selles (@wswebcreation)
-
Updated dependencies [0a2b6d0]
- @wdio/image-comparison-core@1.1.2
@wdio/image-comparison-core@1.1.2
Patch Changes
-
0a2b6d0: ## #1111 Respect saveAboveTolerance when deciding to save actual images when alwaysSaveActualImage is false.
When
alwaysSaveActualImageisfalse, the actual image is no longer written to disk if the mismatch is below the configured tolerance, avoiding extra actuals when the comparison still passes.Committers: 1
- Wim Selles (@wswebcreation)
@wdio/visual-service@9.1.1
Patch Changes
-
340fbe6: # 🐛 Bugfixes
#1098 Improve error message when baseline is missing and both flags are false
When
autoSaveBaseline = falseandalwaysSaveActualImage = falseand a baseline image doesn't exist, the error message now provides clear guidance suggesting users setalwaysSaveActualImagetotrueif they need the actual image to create a baseline manually.Committers: 1
- Wim Selles (@wswebcreation)
-
e4e5b5c: # 🐛 Bugfixes
#1085 autoSaveBaseline collides with the new alwaysSaveActualImage flag
When
autoSaveBaselineistrueandalwaysSaveActualImageisfalse, actual images were still saved. This patch should fix thatCommitters: 1
- Wim Selles (@wswebcreation)
-
ddf68fe: # 🐛 Bugfixes
#1084 expect(...).toMatch*Snapshot methods do not have Promise return types
The methods should be typed as promises
Committers: 1
- Wim Selles (@wswebcreation)
-
Updated dependencies [340fbe6]
-
Updated dependencies [e4e5b5c]
- @wdio/image-comparison-core@1.1.1
@wdio/visual-reporter@0.4.12
Patch Changes
-
e4e5b5c: # 🐛 Bugfixes
#1085 autoSaveBaseline collides with the new alwaysSaveActualImage flag
When
autoSaveBaselineistrueandalwaysSaveActualImageisfalse, actual images were still saved. This patch should fix thatCommitters: 1
- Wim Selles (@wswebcreation)
@wdio/ocr-service@2.2.8
Patch Changes
-
e4e5b5c: # 🐛 Bugfixes
#1085 autoSaveBaseline collides with the new alwaysSaveActualImage flag
When
autoSaveBaselineistrueandalwaysSaveActualImageisfalse, actual images were still saved. This patch should fix thatCommitters: 1
- Wim Selles (@wswebcreation)
@wdio/image-comparison-core@1.1.1
Patch Changes
-
340fbe6: # 🐛 Bugfixes
#1098 Improve error message when baseline is missing and both flags are false
When
autoSaveBaseline = falseandalwaysSaveActualImage = falseand a baseline image doesn't exist, the error message now provides clear guidance suggesting users setalwaysSaveActualImagetotrueif they need the actual image to create a baseline manually.Committers: 1
- Wim Selles (@wswebcreation)
-
e4e5b5c: # 🐛 Bugfixes
#1085 autoSaveBaseline collides with the new alwaysSaveActualImage flag
When
autoSaveBaselineistrueandalwaysSaveActualImageisfalse, actual images were still saved. This patch should fix thatCommitters: 1
- Wim Selles (@wswebcreation)
@wdio/visual-service@9.1.0
Minor Changes
-
bde4851: This PR will implement FR #1077 which is asking not to create the actual image on success. This should create a better performance because no files are writing to the system and should make sure that there's not a lot of noise in the actual folder.
Committers: 1
- Wim Selles (@wswebcreation)
Patch Changes
- Updated dependencies [bde4851]
- @wdio/image-comparison-core@1.1.0