pointfreeco / swift-snapshot-testing

📸 Delightful Swift snapshot testing.
https://www.pointfree.co/episodes/ep41-a-tour-of-snapshot-testing
MIT License
3.75k stars 570 forks source link

Image comparison incorrect result #694

Open vergaramikel opened 1 year ago

vergaramikel commented 1 year ago

Describe the bug After changing an icon the test with 99% of precision continues passing, even if the icon represents around the 25% of the screen. Setting the 100% precision works, but it doesn't fit us as we need to work with M1 Macs too.

To Reproduce Just launch the test in the project with iPhone 11 simulator (if you prefer another, same happens but you will need to retake the screenshots and change the icon to reproduce) . In our project original screen the size is much smaller but I just set it bigger so the bug is more clear. The old image is in the Assets.xcassets if needed. snapshot.zip

Expected behavior Test should fail as the images don't match.

Screenshots

testLandingView back1 testLandingView close1

Environment

Additional context In other occasions even small margin changes were detected, but this time is not working.

vergaramikel commented 1 year ago

Tested with the new 1.11.0 version but the result is the same.