Skip to content

Commit

Permalink
Updated tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw committed Aug 27, 2024
1 parent 34c1dc4 commit e158879
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions Examples/CaseStudiesTests/PresentationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -437,21 +437,21 @@ final class PresentationTests: XCTestCase {
let vc = VC()
try await setUp(controller: vc)

withUITransaction(\.uiKit.disablesAnimations, true) {
vc.presentedChild = Model()
}
try await Task.sleep(for: .seconds(0.5))

withUITransaction(\.uiKit.disablesAnimations, true) {
vc.presentedChild?.isPushed = true
}
try await Task.sleep(for: .seconds(0.5))
vc.presentedChild = Model()
await assertEventuallyNotNil(vc.presentedViewController)

withUITransaction(\.uiKit.disablesAnimations, false) {
vc.presentedChild?.isPushed = false
}
try await Task.sleep(for: .seconds(1))
vc.presentedChild?.isPushed = true
await assertEventuallyEqual(
(vc.presentedViewController as? UINavigationController)?.viewControllers.count,
2
)

try await Task.sleep(for: .seconds(0.3))
vc.presentedChild?.isPushed = false
await assertEventuallyEqual(
(vc.presentedViewController as? UINavigationController)?.viewControllers.count,
1
)
await assertEventuallyNotNil(vc.presentedChild)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "808eb8e1d07661e8b57a786176eca2c0701a6e550ecfe221b0585e8b058c8ebd",
"originHash" : "d0f789afc5a07ea2d162d8405e7e2c61a4303155472804d542723dbcf4eba9e7",
"pins" : [
{
"identity" : "combine-schedulers",
Expand Down Expand Up @@ -67,7 +67,7 @@
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-plugin",
"location" : "https://github.com/swiftlang/swift-docc-plugin",
"state" : {
"revision" : "26ac5758409154cc448d7ab82389c520fa8a8247",
"version" : "1.3.0"
Expand Down

0 comments on commit e158879

Please sign in to comment.