swift-snapshot-testing
swift-snapshot-testing copied to clipboard
📸 Delightful Swift snapshot testing.
**Describe the bug** Running a snapshot test repeatedly with xcode's new 'run test repeatedly' functionality results in additional snapshots being created for that test. We've a wrapper around this library...
Occasionally getting an error on CI > SnapshotTesting/UIImage.swift:24: Fatal error: Unexpectedly found nil while unwrapping an Optional value This is referring to a line here: https://github.com/pointfreeco/swift-snapshot-testing/blob/main/Sources/SnapshotTesting/Snapshotting/UIImage.swift Which has some force...
It seems that Apple Silicon machines generate snapshots that are slightly different from the ones generated on x86 machines. The problem is very similar to the one where the very...
## Deterministically snapshot `NSView`s on any device ### Summary This PR builds upon #412 but maintains compatibility with existing API-behaviour. Additionally to fixing `backingScaleFactor` issues, it also fixes the color...
When snapshot testing iOS views I am using display scale trait depending on the device which layout I am using: ```swift assertSnapshot( matching: /* SwiftUI.View */, as: .image( layout: .device(config:...
Closes #594 This PR adds the `iPhone13`, `iPhone13Pro` and `iPhone13ProMax` devices for snapshot testing and adds a missing `iPhone12Pro` configuration. I took the numbers for device config from: https://useyourloaf.com/blog/iphone-13-screen-sizes I...
**Describe the Issue** It'd be great to have access to a record mode where reference images are only written to disk if the `Diffing` implementation used considers the difference a...
Xcode console emits the message: ``` Unbalanced calls to begin/end appearance transitions for ``` when this line is executed, when there is no existing snapshot on the disk (i.e. first...
**Describe the bug** I'm using SnapshotTesting in a SwiftUI iOS project. I wrap a SwiftUI view under test in a `UIHostingController`and then pass the hosting controller into the `assertSnapshot` method....
Is there something I am missing that I need to set in the ViewImageConfig or somewhere else for the device-specific assets to be used when testing? I am setting iPhone...