[PM-26063] Fix flaky test (#2108)

This commit is contained in:
Matt Czech 2025-11-06 09:33:14 -06:00 committed by GitHub
parent 1f3d8126ae
commit 45b1125cb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -444,10 +444,11 @@ class ItemListProcessorTests: BitwardenTestCase { // swiftlint:disable:this type
XCTFail("There is no onExpiration closure for the first item in the factory")
return
}
onExpiration([firstItemRefreshed])
onExpiration([firstItem])
waitFor(!authItemRepository.refreshedTotpCodes.isEmpty)
XCTAssertEqual(subject.state.searchResults, authItemRepository.refreshedTotpCodes)
waitFor { subject.state.searchResults == [firstItemRefreshed] }
XCTAssertEqual(authItemRepository.refreshedTotpCodes, [firstItem])
XCTAssertEqual(subject.state.searchResults, [firstItemRefreshed])
}
/// `perform(_:)` with `.streamItemList` starts streaming vault items. When there are no shared