1.10.0
Changes that may affect your build requirements
- The package name has been changed from
SnapshotTesting
toswift-snapshot-testing
, to better reflect community naming conventions (#555). This may require you to update anyPackage.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, #554).
- Fixed: iPhone XS Max portrait configuration was not applying base traits (thanks @imvm, #417)
- Fixed: URLRequest strategy now sorts query items for more consistent diffing (thanks @mihai8804858, #491).
- Removed: GLKView is no longer supported (thanks @jpsim, #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, #628). - Added: Windows support, CI (thanks @MaxDesiatov, #532).
- Added: Failure messages now include the snapshot name, if given (thanks @calda, #547).
- Added: iPhone 13 configs (thanks @luispadron, #603).
- Added: iPad 9.7" and iPad 10.2" configs (thanks @skols85, #405).
- Added: iPhone 12 and iPhone 12 Pro Max configs(thanks @imvm, #418).
- Added:
Snapshotting.json
forAny
value (thanks @NachoSoto, #552). - Added: Newly-recorded snapshots are now attached to the test run (thanks @marcelofabri, #586).
- Fixed: the UIImage strategy was using the device scale instead of the scale of the given images (thanks @codeman9, #472).
- Fixed: the UIImage strategy now compares image contexts using the same colorspace (thanks @dflems, #446).
- Fixed: the WebView strategy no longer overrides the delegate (thanks @teameh in #443).
- Fixed: Patched a leak when running tests in a host application (thanks @llinardos, #511).
- Fixed: False positive when asserting reference image with empty image (thanks @nuno-vieira, #453).
- Fixed: watchOS compilation (thanks @aydegee, #579).
- Fixed: Support for repeatedly running tests (thanks @krzysztofpawski, #585).
- Infrastructure: Add
swift-snapshot-testing-stitch
to plugins list (thanks @Sherlouk, #483) - Infrastructure: Document diff tool configuration.
- Infrastructure: README updates (thanks @MaatheusGois, @gohanlon), documentation fixes (thanks @heckj, @valeriyvan).
- Infrastructure: Added GitHub issue templates (#556).
- Infrastructure: Add SnapshotTestingHEIC to plugins list (thanks @alexey1312, #561).
New Contributors
- @arietis made their first contribution in #468
- @codeman9 made their first contribution in #472
- @Nikoloutsos made their first contribution in #482
- @mihai8804858 made their first contribution in #491
- @dflems made their first contribution in #446
- @skols85 made their first contribution in #405
- @imvm made their first contribution in #418
- @teameh made their first contribution in #443
- @MaatheusGois made their first contribution in #496
- @calda made their first contribution in #547
- @MaxDesiatov made their first contribution in #532
- @jpsim made their first contribution in #507
- @arnopoulos made their first contribution in #554
- @llinardos made their first contribution in #511
- @heckj made their first contribution in #601
- @aydegee made their first contribution in #579
- @valeriyvan made their first contribution in #630
- @ejensen made their first contribution in #628
- @luispadron made their first contribution in #603
- @alexey1312 made their first contribution in #561
- @gohanlon made their first contribution in #592
- @marcelofabri made their first contribution in #586
- @nuno-vieira made their first contribution in #453
- @krzysztofpawski made their first contribution in #585
Full Changelog: 1.9.0...1.10.0