uber / ios-snapshot-test-case

Snapshot view unit tests for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Support for Xcode12.0/Swift 5.3

bielikb opened this issue · comments

Hi folks, could you provide Xcode12.0 compatible release of this library?

+1

While the images look identical, the comparison is failing when using a simulator running iOS 14. Xcode 12 running a simulator on iOS 13.5 works fine. There is something slightly off or failing for iOS 14 when doing the comparison.

+1 I thought something was broken on my end. Glad to see I'm not the only one experiencing this.

+1
We are using this library heavily in our CI and we were satisfied until Xcode 12 was released.
Since Xcode 12 the comparisons are failing sometimes and we are not sure why.

commented

+1. please update, or consider dropping the support of binary format. thank you
I know maybe when Swift no longer complains about this, it's the right time for binary again

We have found a workaround!
(Though we are still expecting an official fix for this issue)

Using a perPixelTolerance: 0.01 seems to be sufficient for ignoring the sporadic differences in the snapshots.

Usage example:
FBSnapshotVerifyView(<YOUR VIEW>, perPixelTolerance: 0.01)

commented

@mlachmish I met same issue on our side, most of our tests failed, and manual comparison of the image diff shows that they are just shifting a little bit: link: danielgindi/Charts#4476 (comment)
what we would do is to refresh the images to make it work. I'm feeling it's UIKit rendering issue? but I'm no expert, so need more advice here

We have found a workaround!
(Though we are still expecting an official fix for this issue)

Using a perPixelTolerance: 0.01 seems to be sufficient for ignoring the sporadic differences in the snapshots.

Usage example:
FBSnapshotVerifyView(<YOUR VIEW>, perPixelTolerance: 0.01)

@mlachmish I met same issue on our side, most of our tests failed, and manual comparison of the image diff shows that they are just shifting a little bit: link: danielgindi/Charts#4476 (comment)
what we would do is to refresh the images to make it work. I'm feeling it's UIKit rendering issue? but I'm no expert, so need more advice here

it's not possible to support more than one version of iOS for generated snapshots, so whenever you update xcode there's a chance you'll need to regen the snapshots, that's what most users of the library do

I would not recommend using tolerance just to support different iOS versions or to skip having to regen the images at upgrade, just bite the bullet and upgrade them all

Hi folks, could you provide Xcode12.0 compatible release of this library?

done let me know if something is missing