Skip to content

Commit 378f5d9

Browse files
committed
StorePickerCoordinator: add two test cases for the remaining store picker configurations.
1 parent baf1826 commit 378f5d9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

WooCommerce/WooCommerceTests/Authentication/StorePickerCoordinatorTests.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,30 @@ final class StorePickerCoordinatorTests: XCTestCase {
7676
let storePickerNavigationController = try XCTUnwrap(navigationController.presentedViewController as? UINavigationController)
7777
assertThat(storePickerNavigationController.topViewController, isAnInstanceOf: StorePickerViewController.self)
7878
}
79+
80+
func test_login_configuration_shows_storePicker() throws {
81+
// Given
82+
let coordinator = StorePickerCoordinator(navigationController, config: .login)
83+
84+
// When
85+
coordinator.start()
86+
87+
// Then
88+
waitUntil {
89+
self.navigationController.topViewController is StorePickerViewController
90+
}
91+
}
92+
93+
func test_listStores_configuration_shows_storePicker() throws {
94+
// Given
95+
let coordinator = StorePickerCoordinator(navigationController, config: .listStores)
96+
97+
// When
98+
coordinator.start()
99+
100+
// Then
101+
waitUntil {
102+
self.navigationController.topViewController is StorePickerViewController
103+
}
104+
}
79105
}

0 commit comments

Comments
 (0)