swift-snapshot-testing
swift-snapshot-testing copied to clipboard
Bug on Xcode 14 beta 3
Hello guys,
I'm trying Xcode 14 beta 3 today and when I run snapshot tests, I see couple of differences between previous iOS (eg. indentation between items on form is significantly lower, background color is now white and not light gray etc.). This changes is ok, but I found bug, where data on form was not visible anymore, but before does. Anyone see this bug also?
Thanks.
I've seen something like that for as: .image(layout: .device(config: .iPhoneXsMax(.landscape))
The new snapshot generated is just white.
We're currently also investigating some issues when rendering UITextView on Xcode 14 / iOS 16. In the recorded image, the part where UITextView should be, is just white. It only seems to happen when using textView.attributedText. So far we have figured out, that this line here is responsible for the issue: https://github.com/pointfreeco/swift-snapshot-testing/blob/a02ef9ab8270fa2623af0bf89b26dcb29aaf3290/Sources/SnapshotTesting/Common/View.swift#L964
You could try to comment out that line, see if that makes a difference for you as well.
we are having the same issue with Xcode 14.0 version - could you figure out the root cause?
We're currently using a fork that completely disables offscreen rendering. Downsides: We got some extra space on some views now, because of the safe area inset that is not ignored/worked around anymore by offscreen rendering. In our fork we simply removed this line:
https://github.com/pointfreeco/swift-snapshot-testing/blob/a02ef9ab8270fa2623af0bf89b26dcb29aaf3290/Sources/SnapshotTesting/Common/View.swift#L964
I think that was only bug on Xcode beta, because on latest Xcode 14.0, everything works great again. We can close that issue. Thanks to all for help!
It's definitely not just a bug in the beta, we're on 14.0.1 and we're still facing this issue.
@plu Maybe is your test setup slightly different than mine? Don't know. Did you create own issue with more info here?