github pointfreeco/swift-snapshot-testing 1.10.0

latest releases: 1.17.5, 1.17.4, 1.17.3...
2 years ago

Breaking changes

  • Changed: The package name has been changed from SnapshotTesting to swift-snapshot-testing, to better reflect community naming conventions (#555). This may require you to update any Package.swift files that depend on Snapshot Testing.
  • Deprecated: support for CocoaPods and Carthage has been deprecated. Please use the Swift Package Manager to depend on Snapshot Testing.
  • Deprecated: Snapshot Testing now requires Swift 5.5+, as well at iOS 13+, macOS 10.15+, tvOS 13+, and watchOS 6+.

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 for Any 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

Full Changelog: 1.9.0...1.10.0

Don't miss a new swift-snapshot-testing release

NewReleases is sending notifications on new releases.