The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
## Changes that may affect your build requirements
- The package name has been changed from `SnapshotTesting` to `swift-snapshot-testing`, to better reflect community naming conventions (https://github.com/pointfreeco/swift-snapshot-testing/pull/555). This may require you to update any `Package.swift` files that depend on Snapshot Testing.
- Support for CocoaPods and Carthage has been obsoleted. No new releases will be available on those platforms, starting with 1.10.0. Please use the Swift Package Manager to depend on Snapshot Testing.
- Snapshot Testing now requires Swift 5.5+, as well at iOS 13+, macOS 10.15+, tvOS 13+, and watchOS 6+.
## Changes that may affect snapshot format/output
> **Warning**: The following updates change how a strategy may output a snapshot, causing existing snapshot suites to fail. When upgrading, please rerecord your failing snapshots and audit the changes.
- Fixed: A UIViewController strategy was not passing along the correct trait collection (thanks @arnopoulos, https://github.com/pointfreeco/swift-snapshot-testing/pull/554).
- Fixed: iPhone XS Max portrait configuration was not applying base traits (thanks @imvm, https://github.com/pointfreeco/swift-snapshot-testing/pull/417)
- Fixed: URLRequest strategy now sorts query items for more consistent diffing (thanks @mihai8804858, https://github.com/pointfreeco/swift-snapshot-testing/pull/491).
- Removed: GLKView is no longer supported (thanks @jpsim, https://github.com/pointfreeco/swift-snapshot-testing/pull/507).
## Everything else
- Added: Image-based strategies have a new `perceptualPrecision` option, which can be used to support snapshot tests across Intel and M1 devices. Along for the ride is a 90+% speed improvement to the strategies (thanks @ejensen, https://github.com/pointfreeco/swift-snapshot-testing/pull/628).
- Added: Windows support, CI (thanks @MaxDesiatov, https://github.com/pointfreeco/swift-snapshot-testing/pull/532).
- Added: Failure messages now include the snapshot name, if given (thanks @calda, https://github.com/pointfreeco/swift-snapshot-testing/pull/547).
- Added: iPhone 13 configs (thanks @luispadron, https://github.com/pointfreeco/swift-snapshot-testing/pull/603).
- Added: iPad 9.7" and iPad 10.2" configs (thanks @skols85, https://github.com/pointfreeco/swift-snapshot-testing/pull/405).
- Added: iPhone 12 and iPhone 12 Pro Max configs(thanks @imvm, https://github.com/pointfreeco/swift-snapshot-testing/pull/418).
- Added: `Snapshotting.json` for `Any` value (thanks @NachoSoto, https://github.com/pointfreeco/swift-snapshot-testing/pull/552).
- Added: Newly-recorded snapshots are now attached to the test run (thanks @marcelofabri, https://github.com/pointfreeco/swift-snapshot-testing/pull/586).
- Fixed: the UIImage strategy was using the device scale instead of the scale of the given images (thanks @codeman9, https://github.com/pointfreeco/swift-snapshot-testing/pull/472).
- Fixed: the UIImage strategy now compares image contexts using the same colorspace (thanks @dflems, https://github.com/pointfreeco/swift-snapshot-testing/pull/446).
- Fixed: the WebView strategy no longer overrides the delegate (thanks @teameh in https://github.com/pointfreeco/swift-snapshot-testing/pull/443).
- Fixed: Patched a leak when running tests in a host application (thanks @llinardos, https://github.com/pointfreeco/swift-snapshot-testing/pull/511).
- Fixed: False positive when asserting reference image with empty image (thanks @nuno-vieira, https://github.com/pointfreeco/swift-snapshot-testing/pull/453).
- Fixed: watchOS compilation (thanks @aydegee, https://github.com/pointfreeco/swift-snapshot-testing/pull/579).
- Fixed: Support for repeatedly running tests (thanks @krzysztofpawski, https://github.com/pointfreeco/swift-snapshot-testing/pull/585).
- Infrastructure: Add `swift-snapshot-testing-stitch` to plugins list (thanks @Sherlouk, https://github.com/pointfreeco/swift-snapshot-testing/pull/483)
- Infrastructure: Document diff tool configuration.
- Infrastructure: README updates (thanks @MaatheusGois, @gohanlon), documentation fixes (thanks @heckj, @valeriyvan).
- Infrastructure: Added GitHub issue templates (https://github.com/pointfreeco/swift-snapshot-testing/pull/556).
- Infrastructure: Add SnapshotTestingHEIC to plugins list (thanks @alexey1312, https://github.com/pointfreeco/swift-snapshot-testing/pull/561).
## New Contributors
* @arietis made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/468
* @codeman9 made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/472
* @Nikoloutsos made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/482
* @mihai8804858 made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/491
* @dflems made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/446
* @skols85 made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/405
* @imvm made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/418
* @teameh made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/443
* @MaatheusGois made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/496
* @calda made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/547
* @MaxDesiatov made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/532
* @jpsim made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/507
* @arnopoulos made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/554
* @llinardos made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/511
* @heckj made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/601
* @aydegee made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/579
* @valeriyvan made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/630
* @ejensen made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/628
* @luispadron made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/603
* @alexey1312 made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/561
* @gohanlon made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/592
* @marcelofabri made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/586
* @nuno-vieira made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/453
* @krzysztofpawski made their first contribution in https://github.com/pointfreeco/swift-snapshot-testing/pull/585
**Full Changelog**: https://github.com/pointfreeco/swift-snapshot-testing/compare/1.9.0...1.10.0
- Added: publicized `data` snapshotting strategy (thanks @regexident).
- Speed up `NSImage` comparison (thanks @finestructure, @JaapWijnen).
- Fixed: enabled testing search paths (thanks @thedavidharris).
- Infrastructure: links for AccessibilitySnapshot and AccessibilitySnapshotColorBlindness (thanks @Sherlouk).
- Rename `SnapshotTesting.record` to `SnapshotTesting.isRecording` to avoid clash with XCTestCase's new `record` method (thanks @xavierLowmiller).
- Fix UIApplication selector to return the application as expected (thanks @mstultz).
- Fix key window warning (thanks @tinder-maxwellelliott)
- Change minimum iOS version from iOS 10 to 11 to fix SwiftUI linking problems (thanks @thedavidharris).
- Added: SwiftUI support (thanks @natemann, @regexident).
- Added: Apple TV 4K support (thanks @reez).
- Added: Mac Catalyst support (thanks @rjchatfield).
- Added: UIBezierPath, NSBezierPath, CGPath strategies (thanks @regexident).
- Improved: don't crash on empty images, instead produce error artifact (thanks @mackoj).
- Bug fixed: trait collection now passed to view controller's recursive description strategy (thanks @erikpoort).
- Bug fixed: will no longer crash on hidden/unloaded web views (thanks @stuaustin).
- Bug fixed: don't re-add view controller to window when already added (thanks @hassfers).
- More test coverage (thanks @SatoTakeshiX, @sidepelican).
- Typos fixed (thanks @freak4pc, @jstart).
- Other improvements: timeout error messaging, installation instructions, troubleshooting instructions, Linux CI.
Xcode 11.4 Support
2 years ago
This release fixes a bug introduced in the Xcode 11.4 beta with SPM and Swift 5.2.
SwiftPM Tools 5.0 Support
2 years ago
This minor release introduces backwards compatibility for SwiftPM Tools @ 5.0.
### What's new?
- New snapshot strategy: `wait` (#268)
### What's improved?
- Performance improvement: don't diff during recording (#250)
- Documentation improvement: Xcode 11 installation instructions (#256)
- NSView rendering improvements (#260)
- Documentation improvement: SPM test dependency instructions (#265)
- cURL rendering improvements (#273)
Thanks to @mr-v, @f-meloni, @schwmi, @freak4pc, and @ldstreet for contributing to this release!
1.6.0: Bug fixes and performance improvements 😆
3 years ago
### What's changed since last time?
- Add device sizes for split view variants of iPads (#209)
- Add recording to inline snapshotting (#212)
- Sort cURL strategy headers (#214)
- Add iOS minimum required deployment target to Package.swift (#215)
- Allow dynamic size of views based on trait collection content sizes (#217)
- Disable bitcode (#221)
- Improve `_assertInlineSnapshot` ergonomics and tests (#231 and #232)
- Use `URL.init(fileURLWithPath:isDirectory:)` to avoid file IO (#236)
- Speed up image diffing (#248)
- Improve image diff drawing performance (#249)
Thanks to @Sherlouk, @crayment, @jayhickey, @MarianaMeireles, @pavel-y-ivanov, @ferranpujolcamins, @kirillyakimovich, and @mr-v for making this release happen!
Inline snapshots and more strategies
3 years ago
### What's new
* @rjchatfield has introduced (#199) a brand new way of snapshotting textual information, called "inline snapshot testing," which automatically inlines snapshots directly in your test file. The 1.5.0 release includes a preview of this functionality! You can use the `_assertInlineSnapshot` helper to try it out. Thanks to @rjchatfield for the PR, and find out more [here](https://medium.com/@rjchatfield/inline-snapshot-testing-e5e237fc47f3).
* Two new `URLRequest` snapshot strategies have been included. First, @Sherlouk has included a `curl` snapshotting strategy (#203), which snapshots your prepared requests in the cURL format. Also we now have a snapshot strategy for capturing a `URLRequest` with its body pretty printed, when possible (#157). This helps make `POST` requests more easily inspectable in the reference file.