Skip to content

Instantly share code, notes, and snippets.

@edudnyk
Last active October 7, 2021 23:17
Show Gist options
  • Save edudnyk/8d8618f8b9e1c553a9959e29cf7da3e7 to your computer and use it in GitHub Desktop.
Save edudnyk/8d8618f8b9e1c553a9959e29cf7da3e7 to your computer and use it in GitHub Desktop.
final class SheeTestCase: ViewTestCase {
var dismissCounter: Int = 0
@ViewBuilder
override func initRootView() -> AnyView {
AnyView(ShowPartDetail { [weak self] in
guard let self = self else { return }
self.dismissCounter += 1
})
}
override func setUp() {
super.setUp()
UIView.setAnimationsEnabled(false)
}
override func tearDown() {
super.tearDown()
UIView.setAnimationsEnabled(true)
}
var presentedViewController: UIHostingController<AnyView>? {
window?
.rootViewController?
.presentedViewController as? UIHostingController<AnyView>
}
func test() {
viewTest?.loop()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment