From 45b1125cb8a5c7a09bc607326c7b13cd7646e8ab Mon Sep 17 00:00:00 2001 From: Matt Czech Date: Thu, 6 Nov 2025 09:33:14 -0600 Subject: [PATCH] [PM-26063] Fix flaky test (#2108) --- .../Vault/ItemList/ItemList/ItemListProcessorTests.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AuthenticatorShared/UI/Vault/ItemList/ItemList/ItemListProcessorTests.swift b/AuthenticatorShared/UI/Vault/ItemList/ItemList/ItemListProcessorTests.swift index f3a997d77..520a9a55a 100644 --- a/AuthenticatorShared/UI/Vault/ItemList/ItemList/ItemListProcessorTests.swift +++ b/AuthenticatorShared/UI/Vault/ItemList/ItemList/ItemListProcessorTests.swift @@ -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