From 69ecb40cdd57c10353c7909398e4e987486e9af5 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 28 May 2024 09:25:29 +0200 Subject: [PATCH] Fix test, `NotificationSettingsEvents.RefreshSystemNotificationsEnabled` is emitting first. --- .../notifications/NotificationSettingsViewTest.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsViewTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsViewTest.kt index 58a685719a..790a4c7f25 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsViewTest.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsViewTest.kt @@ -261,7 +261,12 @@ class NotificationSettingsViewTest { ), ) rule.clickOn(R.string.screen_advanced_settings_push_provider_android) - eventsRecorder.assertSingle(NotificationSettingsEvents.ChangePushProvider) + eventsRecorder.assertList( + listOf( + NotificationSettingsEvents.RefreshSystemNotificationsEnabled, + NotificationSettingsEvents.ChangePushProvider, + ) + ) } @Test @@ -275,7 +280,12 @@ class NotificationSettingsViewTest { ), ) rule.onNodeWithText("P2").performClick() - eventsRecorder.assertSingle(NotificationSettingsEvents.SetPushProvider(1)) + eventsRecorder.assertList( + listOf( + NotificationSettingsEvents.RefreshSystemNotificationsEnabled, + NotificationSettingsEvents.SetPushProvider(1), + ) + ) } }