Skip to content

Releases: pointfreeco/swift-snapshot-testing

1.6.0: Bug fixes and performance improvements 😆

25 Sep 16:48
35aac0f
Compare
Choose a tag to compare

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

29 Mar 20:58
883f0b0
Compare
Choose a tag to compare

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.

  • 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.

Swift 5 Support

26 Mar 17:42
Compare
Choose a tag to compare

This release brings SnapshotTesting up to date with Swift 5!

What's changed?

  • Swift 5 support!
  • The SnapshotTestCase subclass is no longer needed on Linux and has been deprecated as a type alias to XCTestCase. The type alias will be removed in a future version (#200).
  • The dump strategy has been optimized (#195).

11" iPad Pro Support, Better Extensibility, Better Messaging

14 Mar 21:55
1fb2e65
Compare
Choose a tag to compare

What's new?

  • A new view configuration for the 11" iPad Pro's resolution and safe area (#187).
  • A few let properties on Snapshotting and Diffing have been relaxed to be vars to make it easier to build strategies from existing ones (#189).
  • The UIImage diff message has been generalized to read nicely while in record mode (#188).

1.2.0

20 Feb 22:42
0ea1b40
Compare
Choose a tag to compare

What's new?

  • Small updates to failure messages #153
  • Renamed generics in pullback #154
  • Support asserting against multiple strategies at once #150
  • Make XCTAttachment's initializers public #159
  • Create a typealias for SnapshotTestCase when not on Linux #169
  • Specify custom snapshot directory #170
  • Extract image diffing strategies. #172

1.1.0

18 Dec 17:54
129e393
Compare
Choose a tag to compare

What's new?

  • Updated UIView and UIViewController recursiveDescription strategies to support custom trait collections and configuration (#141)
  • Added a new UIViewController hierarchy snapshot strategy (#139)
  • Added a new func strategy on functions that take CaseIterable values (#94)
  • Added a new description strategy powered by String.init(describing:) (#94)
  • Show diff when recording over previous snapshot (#147)

What's been fixed?

  • Improved the assertSnapshot function's generic names (#120)
  • Improved the recording failure message (#135, #140)
  • Fixed a crash when snapshotting view controllers with main views configured with auto layout (#142)
  • Fixed a crash when running swift test against a failing snapshot (#143)

Official release for SnapshotTesting

03 Dec 14:03
Compare
Choose a tag to compare