Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form isn't rendered properly in Snapshot #687

Closed
surajsau opened this issue Dec 16, 2022 · 1 comment
Closed

Form isn't rendered properly in Snapshot #687

surajsau opened this issue Dec 16, 2022 · 1 comment

Comments

@surajsau
Copy link

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
@surajsau
Copy link
Author

Duplicate of #667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant