You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: pass matcher threshold to core as saveAboveTolerance (#1113)
* fix: pass matcher threshold to core as saveAboveTolerance
When using visual matchers with a threshold (e.g., toMatchScreenSnapshot('tag', 0.9))
and alwaysSaveActualImage: false, images were still saved even when the comparison
passed within the threshold.
The matcher now passes the expected threshold to the core as saveAboveTolerance,
ensuring images are only saved when mismatch exceeds the user's acceptable threshold.
Fixes#1111
Co-authored-by: Cursor <[email protected]>
* chore: add extra UI test
* chore: update changelog
---------
Co-authored-by: Cursor <[email protected]>
## #1111 Pass matcher threshold to core as saveAboveTolerance
8
+
9
+
When using visual matchers like `toMatchScreenSnapshot('tag', 0.9)` with `alwaysSaveActualImage: false`, the actual image was still being saved even when the comparison passed within the threshold.
10
+
11
+
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.
12
+
13
+
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.
14
+
15
+
16
+
# Committers: 1
17
+
18
+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
0 commit comments