From 0ed22b0dd91f5a727ed1996d754e3467d1e3869a Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Fri, 27 Feb 2026 10:34:15 +0100 Subject: [PATCH] flaky test fix --- .../Sources/RoomNotificationSettingsScreenViewModelTests.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UnitTests/Sources/RoomNotificationSettingsScreenViewModelTests.swift b/UnitTests/Sources/RoomNotificationSettingsScreenViewModelTests.swift index eeca58ce3..785028bd9 100644 --- a/UnitTests/Sources/RoomNotificationSettingsScreenViewModelTests.swift +++ b/UnitTests/Sources/RoomNotificationSettingsScreenViewModelTests.swift @@ -221,6 +221,8 @@ struct RoomNotificationSettingsScreenViewModelTests { #expect(notificationSettingsProxyMock.setNotificationModeRoomIdModeReceivedArguments?.1 == .mute) #expect(notificationSettingsProxyMock.setNotificationModeRoomIdModeCallsCount == 2) + try await Task.sleep(for: .milliseconds(10)) // Workaround for flaky test + deferredMode = deferFulfillment(viewModel.context.observe(\.viewState.pendingCustomMode), transitionValues: [nil, .mentionsAndKeywordsOnly, nil]) viewModel.context.send(viewAction: .setCustomMode(.mentionsAndKeywordsOnly))