swift-snapshot-testing icon indicating copy to clipboard operation
swift-snapshot-testing copied to clipboard

Bug on Xcode 14 beta 3

Open Mika5652 opened this issue 3 years ago • 1 comments

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.

Screenshot 2022-07-09 at 15 43 57

Mika5652 avatar Jul 09 '22 13:07 Mika5652

I've seen something like that for as: .image(layout: .device(config: .iPhoneXsMax(.landscape)) The new snapshot generated is just white.

DanKorkelia avatar Aug 15 '22 22:08 DanKorkelia

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.

plu avatar Sep 30 '22 10:09 plu

we are having the same issue with Xcode 14.0 version - could you figure out the root cause?

ashtiani avatar Oct 14 '22 21:10 ashtiani

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

plu avatar Oct 17 '22 10:10 plu

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!

Mika5652 avatar Oct 19 '22 14:10 Mika5652

It's definitely not just a bug in the beta, we're on 14.0.1 and we're still facing this issue.

plu avatar Oct 20 '22 06:10 plu

@plu Maybe is your test setup slightly different than mine? Don't know. Did you create own issue with more info here?

Mika5652 avatar Oct 22 '22 15:10 Mika5652