diff --git a/Example/SwiftUICoordinatorExample/SwiftUICoordinatorExample/Dependencies/CoordinatorFactory.swift b/Example/SwiftUICoordinatorExample/SwiftUICoordinatorExample/Dependencies/CoordinatorFactory.swift index a3ce2db..6193b02 100644 --- a/Example/SwiftUICoordinatorExample/SwiftUICoordinatorExample/Dependencies/CoordinatorFactory.swift +++ b/Example/SwiftUICoordinatorExample/SwiftUICoordinatorExample/Dependencies/CoordinatorFactory.swift @@ -8,6 +8,7 @@ import SwiftUI import SwiftUICoordinator +@MainActor protocol CoordinatorFactory { func makeShapesCoordinator(parent: Coordinator) -> ShapesCoordinator func makeSimpleShapesCoordinator(parent: Coordinator) -> SimpleShapesCoordinator diff --git a/Tests/SwiftUICoordinatorTests/Mocks/Coordinator/MockTransition.swift b/Tests/SwiftUICoordinatorTests/Mocks/Coordinator/MockTransition.swift index 5e94714..1343dae 100644 --- a/Tests/SwiftUICoordinatorTests/Mocks/Coordinator/MockTransition.swift +++ b/Tests/SwiftUICoordinatorTests/Mocks/Coordinator/MockTransition.swift @@ -10,7 +10,7 @@ import SwiftUICoordinator class MockTransition: NSObject, Transition { func isEligible(from fromRoute: NavigationRoute, to toRoute: NavigationRoute, operation: NavigationOperation) -> Bool { - return true + return (fromRoute as? MockRoute == .circle && toRoute as? MockRoute == .rectangle) } func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {