Skip to content

Latest commit

 

History

History
183 lines (125 loc) · 5.35 KB

CHANGELOG.md

File metadata and controls

183 lines (125 loc) · 5.35 KB

Version 5.1.0

07 Oct 2020

  • Bump project settings to Xcode 12.
  • Bump minimum deployment target to iOS 10.0.

Version 5.0.1

21 Aug 2020

Fixed to load on iOS 10.3.3 devices.

Version 5.0.0

30 Jan 2020

This release adds diagnostic test failures if verifiers clash.

  • Fail test if code creates multiple instances of any single verifier. This inadvertently undid its swizzling, leading to test failures that were tricky to diagnose. Now a failure message provides guidance.
  • Also fail if an AlertVerifier and a PresentationVerifier exist simultaneously, since they both swizzle UIAlertViewController. This has the potential to change test results, so this is marked as a major release.

Version 4.2.2

13 Sep 2019

Switch to Legacy Build System to try to improve flaky build errors around importing Swift-generated headers into Objective-C.

Version 4.2.1

05 Sep 2019

Reduced minimum deployment target to iOS 9.0.

Version 4.2.0

30 Aug 2019

Added DismissalVerifier to capture calls to dismiss view controller. The Swift version has a verify method which checks:

  • That the dismissed count is 1.
  • The animated flag.
  • The dismissed view controller, if provided.

Like the other verifiers, it also has a capturedCompletion to capture any production code completion handler, and a testCompletion so that test code can supply its own completion handler.

Version 4.1.1

24 Aug 2019

  • Fix alert verify to pass call site file/line for title and message errors.

Version 4.1.0

23 Aug 2019

Added verify methods to the Swift versions of each verifier.

  • The PresentationVerifier method checks:
    • That the presented count is 1.
    • The animated flag.
    • The presenting view controller, if provided.
    • The type of the presented view controller.
    • Returns the view controller cast to the expected type (or nil if it didn't match).
  • The AlertVerifier method checks:
    • That the presented count is 1.
    • The title.
    • The message.
    • The animated flag.
    • The preferred style (.alert or .actionSheet).
    • The presenting view controller, if provided.
    • The titles and styles of each action.

Version 4.0.0

24 Jul 2019

MockUIAlertController is dead. Long live ViewControllerPresentationSpy!

  • Added PresentationVerifier to capture any presented view controller. It's able to capture segues.
  • Rewrote alert verifier in Swift. You no longer need a bridging header.
  • Simplified name of alert verifier to AlertVerifier (Swift) or QCOAlertVerifier (Objective-C).
  • Use simpler naming for invoking button action, and made it a Swift throwing function. This changes the Objective-C implementation to return an NSError via an "in-out" parameter.
  • Renamed test code completion handler to testCompletion.
  • The production code completion handler passed to present(_:animated:completion:) is no longer executed right away. Instead, it's captured in capturedCompletion. That way tests can execute it after executing a button action.
  • Removed actionTitles and -styleForButtonWithTitle:, deprecated in Version 3.1.0.

Version 3.2.0

10 Feb 2019

  • Added completion closure invoked when alert is presented. If you present an alert from DispatchQueue.main.async, you can use this to fulfill an XCTestExpectation for async testing.
  • Improved README instructions on bridging header for Swift.

Version 3.1.0

01 Jan 2019

  • Added actions which greatly simplify Swift tests. Instead of alertVerifier.actionsTitles[0] as? String, use alertVerifier.actions[0].title
  • Added preferredAction
  • Added textFields
  • Share scheme for Carthage builds. Thanks to: Kevin Donnelly

Deprecated:

  • Deprecated actionTitles and -styleForButtonWithTitle:. Use actions instead.

Version 3.0.0

02 Feb 2018

  • Changed animated from NSNumber to BOOL.
  • Added presentingViewController

Version 2.0.2

30 Jan 2018

  • Fixed crash when presenting UIDocumentMenuViewController while mocking UIAlertController. Thanks to: Andrei Tulai

Version 2.0.1

06 Mar 2017

  • Fixed nullability mistake: actionTitles are non-null.
  • Add shared scheme to satisfy latest version of Carthage.

Version 2.0.0

19 Feb 2017

  • Annotate nullability. The QCOMockAlertVerifier initializer is now non-null, which changes Swift use.
  • Added Swift sample app.
  • Updated example tests to put QCOMockAlertVerifier in test fixture. This is now recommended, to avoid tests which accidentally present real alerts.

Version 1.1.1

11 Sep 2016

  • Change UIAlertController's actual preferredStyle instead of keeping it in an associated property, to avoid UIKit consistency exceptions. Thanks to: nirgin
  • Allow executeActionForButtonWithTitle: even when no handler was set. Thanks to: John Foulkes
  • Don't record presentation of non-alerts. Thanks to: Tom Bates
  • Quiet runtime warning about attempting to load view controller while deallocating. Thanks to: Marcelo Fabri

Version 1.1.0

24 Dec 2015

  • Repackage as Cocoa Touch Framework project.
  • Support Carthage.
  • CocoaPods: Distinguish between public headers and private headers.

Version 1.0.0

23 Aug 2015

  • Initial release. Thanks to Victor Ilyukevich for suggestions, testing, and cleanup.