- Nothing yet!
- Compatibility with Nimble v13 - @ddanielczyk
- Fixes search paths (
Type 'XCTContext' has no member 'runActivity'
error) - @anton-plebanovich
- Compatibility with Xcode 15 / new Predicate type. See #268 - @younata
- Fixes SPM definition. See #255 - @diogot
- Compatibility with Nimble v11. See #253 - @younata
- Set swift-tools-version to 5.3 - @dogo
- Update SPM dependency Nimble to 10.0.0 - @dogo
- Fix ios-snapshot-test-case compilation with Carthage - @dogo
- Fix SPM class name is not removed from snapshot image name. See #246 - dogo
- Fix SPM compilation with iOSSanpshotTestCase 8.0.0 - @dogo
- Update ios-snapshot-test-case to the latest version (8.0.0) - @joaolfp
- Update ios-snapshot-test-case to the latest version (7.0.0) - @dogo
- Add Swift Package Manager support. See #227 - @dogo
- Adds
shouldIgnoreScale
parameter to omit@1x
,@2x
,@3x
from snapshot images. See #225 – @thanasak-s
- Adds
identifier
to snapshots. See #214 - hfehrmann - Updates tvOS dependency from 9.0 to 10.0. See #213 - hufkens
- Renames
shared
tosharedInstance
for Objective-C uses ofCurrentTestCaseTracker
. See #210 - robinbonin
- Adds support for Nimble 9 by removing CocoaPods version specifier. See #207 - samjohn
- Fixes tvOS compilation for Carthage - see #199 - daltonclaybrook
- Adds support for replacing all snapshot reference images. See #198 - dogo
- Carthage-only release to fix search pages. See #196 - joeydong
- Adds additional control over
pixelTolerate
- paulz
- Adds optional
pixelTolerance
parameter - paulz
- Update ios-snapshot-test-case to the latest version (6.1.0) - Vkt0r
- Remove the unnecessary
.swift-version
file - Vkt0r
- Updates Swift, CocoaPods versions - @ashfurrow
- Fix objc header import - @lascorbe
- Add
swift_version
to.podspec
- @lascorbe
- Xcode 10.2.1 and Swift 5.0 support - @Vkt0r
- Breaking change: filenames generated by the underlying library are different (specifically spaces-vs-underscores). You will likely need to regenerate your snapshots when upgrading to 7.0.0.
- Update ios-snapshot-test-case to 6.0.0 - @karpelcev
- Dropped support for iOS 8 and 9 - @karpelcev
- Update ios-snapshot-test-case to 5.0.2 - @dogo
- Fix compareSnapShot signature - @dogo
- Save the failed tests directory in the CircleCI artifacts - @Vkt0r
- Run second_curtain in the pipeline of
xcodebuild
- @Vkt0r - Xcode 10 Support (Swift 4 & Swift 4.2). @freak4pc
- Add second_curtain to the project - @Vkt0r
- Set image diff directory from environment variable if present - @flobories
- Fix failed snapshots not being saved - @marcelofabri
- Fix an error regarding
iOSSnapshotTestCase
breaking compatibility change in version 4.0.0 - @Vkt0r - Load reference images directory path from environment variable if present - @aniastrzezek
- Change the images name for XCAttachments based on the origin image's name - @maryam
- Add test images to the test results as XCAttachments - @tabend
- Add the optional
identifier
for each snapshot function, to be used is there are multiple snapshot tests in a given test method - @Vkt0r
- Fix an error causing the project wasn't building with Xcode 9.3 - @Vkt0r
- Fix
pod lib lint
warnings in Xcode 9 - @paulz
- Migrate from FBSnapshotTestCase to iOSSnapshotTestCase - @freak4pc
- Update the
README
to use the new iOSSnapshotTestCase - @Vkt0r - Update the
Cartfile
to use the latest version of the iOSSnapshotTestCase - @Vkt0r - Fixed bug in the iOS9+ first-pass-layout-workaround to check both height and width (was a typo) #145 - @davertay
- Xcode 9 / Swift 4 support - @danielsaidi
- Adds Carthage support for tvOS - @tsabend
- Fixes Carthage install dependency mismatch – @NachoSoto
- Makes DynamicType tests to work with
adjustsFontForContentSizeCategory
property and with views that usestraitCollectionDidChange:
. - @marcelofabri - Trigger a view to be loaded prior to first
traitCollectionDidChange
call when doing dynamic type testing of a view controller - @yas375
- tvOS support for CocoaPods added. - @fousa
- Don't import Quick directly. This means you should add Quick to your Podfile if you want to use it. - @marcelofabri
- Removes OCMock dependency for DynamicType subspec - @marcelofabri
- Include all subspecs by default, allowing usage with Carthage - @marcelofabri
- Fixes Carthage installs of 5.0.0.
- Update the Cartfile to use always the latest stable release of Nimble and Quick.
- Fix issue with the installation using Carthage.
- Changed use of deprecated
MatcherFunc
toPredicate
in favor ofNimble v7.0.0
. - Drops support for Swift 2.3 - @marcelofabri
- Adds device agnostic support for testing dynamic sizes - @fsaragoca
- Makes it possible to use it without Quick - @marcelofabri
- Support usesDrawRect when using PrettySyntax - @marcelofabri
- Exposes
FBSnapshotTest
as a public class with a publicsetReferenceImagesDirectory
function - @ashfurrow
- Adds support for Carthage (Swift 3.0) - @juolgon & @lascorbe
- Adds support for Carthage (Swift 2.3) - @juolgon & @lascorbe
-
Adds support for testing dynamic sizes - @bruno.mazzo
You need the use the new subspec to enjoy this new feature:
pod 'Nimble-Snapshots/DynamicSize'
Then you can use the new
haveValidDynamicSizeSnapshot
andrecordDynamicSizeSnapshot
matchers to use it:let sizes = ["SmallSize": CGSize(width: 44, height: 44), "MediumSize": CGSize(width: 88, height: 88), "LargeSize": CGSize(width: 132, height: 132)] // expect(view).to(recordDynamicSizeSnapshot(sizes: sizes)) expect(view).to(haveValidDynamicSizeSnapshot(sizes: sizes)) // You can also just test some sizes: expect(view).to(haveValidDynamicSizeSnapshot(sizes: sizes)) // If you prefer the == syntax, we got you covered too: expect(view) == dynamicSizeSnapshot(sizes: sizes) expect(view) == dynamicSizeSnapshot(sizes: sizes)
By default, the size will be set on the view using the frame property. To change this behavior you can use the
ResizeMode
enum:public enum ResizeMode { case frame case constrains case block(resizeBlock: (UIView, CGSize)->()) case custom(ViewResizer: ViewResizer) }
To use the enum you can
expect(view) == dynamicSizeSnapshot(sizes: sizes, resizeMode: newResizeMode)
. For custom behavior you can useResizeMode.block
. The block will be call on every resize. Or you can implement theViewResizer
protocol and resize yourself. The custom behavier can be use to record the views too.
For more info on usage, check the dynamic sizes tests.
- Improved failure messages by removing the prefix ", got" - @MP0w
-
Adds support for testing dynamic type - @marcelofabri
You need the use the new subspec to enjoy this new feature:
pod 'Nimble-Snapshots/DynamicType'
Then you can use the new
haveValidDynamicTypeSnapshot
andrecordDynamicTypeSnapshot
matchers to use it:// expect(view).to(recordDynamicTypeSnapshot() expect(view).to(haveValidDynamicTypeSnapshot()) // You can also just test some sizes: expect(view).to(haveValidDynamicTypeSnapshot(sizes: [UIContentSizeCategoryExtraLarge])) // If you prefer the == syntax, we got you covered too: expect(view) == dynamicTypeSnapshot() expect(view) == dynamicTypeSnapshot(sizes: [UIContentSizeCategoryExtraLarge])
Note that this will post an
UIContentSizeCategoryDidChangeNotification
, so your views/view controllers need to observe that and update themselves.For more info on usage, check the dynamic type tests.
-
Removes support for Xcode 7.3 and Swift 2.2 - @marcelofabri
- Adds Swift 2.3/3.0 support - @carezone
- Adds
tolerance
so you can specify tolerance of reference image differences – @mpurland
- Adds
recordSnapshot(name=nil)
so you can useexpect(thing) == recordSnapshot()
as this feels much nicer than writingexpect(thing).to( recordSnapshot() )
- I'm still not over thisto( thing() )
' bit in Quick. Looks messy. - @orta
-
Nimble-Snapshots does not call
view?.drawViewHierarchyInRect(bounds, afterScreenUpdates: true)
on your views by default. - @ortaIf this is something that you need in order to get your snapshots passing, you should look at two options:
-
Adding the view to an existing window, then calling
drawViewHierarchyInRect:afterScreenUpdates:
- this is the technique that is used insideFBSnapshotTestController
, which we now expose as an option inrecordSnapshot
andhaveValidSnapshot
asusesDrawRect
expect(imageView).to( recordSnapshot(usesDrawRect: true) ) expect(imageView).to( haveValidSnapshot(usesDrawRect: true) )
You can get more info on the technique on this issue
-
- Spending time looking in how you can remove Async code from your App. Or look for places where you are relying on a view structure which isn't set up in your tests. There are a bunch of examples in https://github.com/orta/pragmatic-testing on removing Async.
- Loosens dependency version. - @alesker
- Calls through to
drawViewHierarchyInRect
on every snapshot prior to snapshot being made – @ashfurrow
- Disables bitcode – @ashfurrow
- Name sanitizing, custom folders and more housekeeping - @colinta
- Device diagnostic code – @esttorhe
- Swift 2 support - @tibr
- Updates Quick and Numble to latest (requires Xcode 6.3+) - @andreamazz
- Adds pretty syntax support for snapshots with unspecified names - @ashfurrow
- Ensure all ReferenceImages folders are in the same root folder - @orta
- Updated to official repos of Quick and Nimble for beta 5 support - @ashfurrow