Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Test Screen Transition iOS
import XCTest
import Hamcrest
@testable import MyExampleApp
class ExampleViewControllerTest: XCTestCase {
...
func testNavigatesToOtherScreen() {
let controller = ExampleViewController.loadFromStoryboard()
assertThat(controller.view, present())
UIWindow.present(viewController: controller) { () in
controller.didTapButtonToGoToOtherViewController(NSObject())
assertThat(controller.presentedViewController, presentAnd(instanceOf(OtherViewController)))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.