Skip to content

Commit c46c737

Browse files
committed
Fix failed test
1 parent c5e178c commit c46c737

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

WooCommerce/WooCommerceTests/Yosemite/StoresManagerTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,16 @@ final class StoresManagerTests: XCTestCase {
446446
isLoggedInValues.append(isLoggedIn)
447447
}
448448
manager.authenticate(credentials: SessionSettings.wporgCredentials)
449-
XCTAssertTrue(manager.isAuthenticated)
450449

451450
// When
452451
let error = ApplicationPasswordUseCaseError.unauthorizedRequest
453452
MockNotificationCenter.testingInstance.post(name: .ApplicationPasswordsGenerationFailed, object: error, userInfo: nil)
454453

455454
// Assert
455+
waitUntil {
456+
isLoggedInValues == [false, true, false]
457+
}
456458
XCTAssertFalse(manager.isAuthenticated)
457-
XCTAssertEqual(isLoggedInValues, [false, true, false])
458459
}
459460

460461
/// Verifies that user is logged out when application password regeneration fails if authenticated with wpcom

0 commit comments

Comments
 (0)