waitConfirmation implementation (#5130)

* `waitConfirmation` implementation

* even better docs

* made the body not async since the context of usage did not really require it

* pr suggestions
This commit is contained in:
Mauro
2026-02-23 14:24:19 +01:00
committed by GitHub
parent 546a71df0c
commit 6f1720da89
8 changed files with 262 additions and 77 deletions
@@ -168,17 +168,17 @@ struct NavigationTabCoordinatorTests {
}
@Test
mutating func overlayDismissalCallbackWhenChangingMode() async throws {
mutating func overlayDismissalCallbackWhenChangingMode() async {
let overlayCoordinator = SomeTestCoordinator()
try await confirmation("Callback should not be called when just changing mode",
expectedCount: 0) { confirmation in
await waitForConfirmation("Callback should not be called when just changing mode",
expectedCount: 0,
timeout: .seconds(1)) { confirmation in
navigationTabCoordinator.setOverlayCoordinator(overlayCoordinator) {
confirmation()
}
navigationTabCoordinator.setOverlayPresentationMode(.minimized)
try await Task.sleep(for: .seconds(1))
}
}