Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@wdio/image-comparison-core@1.1.3
Patch Changes
a3bc7a4: ## alwaysSaveActualImage: false does not respect browser.checkElement/Screen/FullPageScreen #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:
alwaysSaveActualImage: falseandsaveAboveToleranceis not explicitly set, actual images are never saved (respecting the literal meaning of the option)saveAboveToleranceis explicitly set (like matchers do internally), actual images are saved only when the mismatch exceeds that thresholdCommitters: 1
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 alwaysSaveActualImage: false does not respect browser.checkElement/Screen/FullPageScreen #1115)save*= always save,check*= respectalwaysSaveActualImagesettingImplementation details:
alwaysSaveActualImage: truewhen callingsave*methods directly from the browser APIsave*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 internallysave*methods work correctly when called directly while still respectingalwaysSaveActualImageforcheck*methodsCommitters: 1
@wdio/visual-service@9.1.4
Patch Changes
a3bc7a4: ## alwaysSaveActualImage: false does not respect browser.checkElement/Screen/FullPageScreen #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:
alwaysSaveActualImage: falseandsaveAboveToleranceis not explicitly set, actual images are never saved (respecting the literal meaning of the option)saveAboveToleranceis explicitly set (like matchers do internally), actual images are saved only when the mismatch exceeds that thresholdCommitters: 1
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 alwaysSaveActualImage: false does not respect browser.checkElement/Screen/FullPageScreen #1115)save*= always save,check*= respectalwaysSaveActualImagesettingImplementation details:
alwaysSaveActualImage: truewhen callingsave*methods directly from the browser APIsave*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 internallysave*methods work correctly when called directly while still respectingalwaysSaveActualImageforcheck*methodsCommitters: 1
Updated dependencies [a3bc7a4]
Updated dependencies [a3bc7a4]