pointfreeco/swift-snapshot-testing

Form isn't rendered properly in Snapshot

surajsau opened this issue · 1 comments

Describe the bug
Form isn't being rendered properly in Snapshots.

To Reproduce
Used this code

// And/or enter code that reproduces the behavior here.
class SampleSnapshotTest: XCTestCase {
    
    func testDefault() {
        let vc = UIHostingController(rootView: SampleForm())
        vc.view.frame = UIScreen.main.bounds
        
        assertSnapshot(matching: vc, as: .image)
    }
}

struct SampleForm: View {
    
    var body: some View {
        Form {
            Section {
                Text("Item1")
                Text("Item1")
                Text("Item1")
                Text("Item1")
                Text("Item1")
            } header: {
                Text("Header")
            }
        }
    }
}

Expected behavior
スクリーンショット 2022-12-16 15 06 28

Screenshots

Environment

  • swift-snapshot-testing version 1.10.0
  • Xcode Version 14.2 (14C18)
  • Swift 5.7.2
  • OS: 16.2

Duplicate of #667