Add test on NotificationSettingsView

This commit is contained in:
Benoit Marty 2024-03-27 21:30:07 +01:00 committed by Benoit Marty
parent 09b2cbaaf5
commit 91de03e4b9
2 changed files with 217 additions and 5 deletions

View file

@ -31,18 +31,23 @@ open class NotificationSettingsStateProvider : PreviewParameterProvider<Notifica
fun aNotificationSettingsState(
changeNotificationSettingAction: AsyncAction<Unit> = AsyncAction.Uninitialized,
atRoomNotificationsEnabled: Boolean = true,
callNotificationsEnabled: Boolean = true,
inviteForMeNotificationsEnabled: Boolean = true,
appNotificationEnabled: Boolean = true,
eventSink: (NotificationSettingsEvents) -> Unit = {},
) = NotificationSettingsState(
matrixSettings = NotificationSettingsState.MatrixSettings.Valid(
atRoomNotificationsEnabled = true,
callNotificationsEnabled = true,
inviteForMeNotificationsEnabled = true,
atRoomNotificationsEnabled = atRoomNotificationsEnabled,
callNotificationsEnabled = callNotificationsEnabled,
inviteForMeNotificationsEnabled = inviteForMeNotificationsEnabled,
defaultGroupNotificationMode = RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY,
defaultOneToOneNotificationMode = RoomNotificationMode.ALL_MESSAGES,
),
appSettings = NotificationSettingsState.AppSettings(
systemNotificationsEnabled = false,
appNotificationsEnabled = true,
appNotificationsEnabled = appNotificationEnabled,
),
changeNotificationSettingAction = changeNotificationSettingAction,
eventSink = {}
eventSink = eventSink,
)