-
Notifications
You must be signed in to change notification settings - Fork 232
Closed
Copy link
Description
Description
It seems that in some cases, Paparazzi will ignore the maxPercentDifference = 0.0
and will falsely pass the tests, even when the recorded image differs from the new image.
This seems to be happening when the result of the comparion is the DiffResult.Similar
. It appears percentage is not forwarded in this case, but always hardcoded as zero:
is Similar -> result.delta to 0f |
Steps to Reproduce
- Record the snapshot with the following test:
class BugDemo {
@get:Rule
val paparazzi: Paparazzi = Paparazzi(deviceConfig = DeviceConfig.NEXUS_5, maxPercentDifference = 0.0)
@Test
fun test() {
paparazzi.snapshot {
Box(Modifier.size(1024.dp).background(Color.Black).padding(100.dp)) {
Box(Modifier.size(400.dp, 1.dp).background(Color.White))
}
}
}
}
- Change the width of the inner box from
400.dp
to the390.dp
- Run the verify task
Expected behavior
When maxPercentDifference
is set to 0.0
, then any change in the image should fail the verification, no matter how small
Additional information:
- Paparazzi Version: 1.3.5
- OS: Linux
- Compile SDK: 35
- Gradle Version: 8.11.1
- Android Gradle Plugin Version: 8.10.0
Screenshots

Paparazzi does not detect line slightly shrinking in the above image
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working