mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Alert the user about configuration mismatch in notification settings (#1543)
This commit is contained in:
@@ -204,6 +204,25 @@ class MockScreen: Identifiable {
|
||||
notificationSettings: NotificationSettingsProxyMock(with: .init()),
|
||||
isModallyPresented: false)
|
||||
return NotificationSettingsScreenCoordinator(parameters: parameters)
|
||||
case .notificationSettingsScreenMismatchConfiguration:
|
||||
let userNotificationCenter = UserNotificationCenterMock()
|
||||
userNotificationCenter.authorizationStatusReturnValue = .denied
|
||||
let session = MockUserSession(clientProxy: MockClientProxy(userID: "@mock:matrix.org"),
|
||||
mediaProvider: MockMediaProvider())
|
||||
let notificationSettings = NotificationSettingsProxyMock(with: .init())
|
||||
notificationSettings.getDefaultRoomNotificationModeIsEncryptedIsOneToOneClosure = { isEncrypted, isOneToOne in
|
||||
switch (isEncrypted, isOneToOne) {
|
||||
case (true, _):
|
||||
return .allMessages
|
||||
case (false, _):
|
||||
return .mentionsAndKeywordsOnly
|
||||
}
|
||||
}
|
||||
let parameters = NotificationSettingsScreenCoordinatorParameters(userSession: session,
|
||||
userNotificationCenter: userNotificationCenter,
|
||||
notificationSettings: notificationSettings,
|
||||
isModallyPresented: false)
|
||||
return NotificationSettingsScreenCoordinator(parameters: parameters)
|
||||
case .onboarding:
|
||||
return OnboardingCoordinator()
|
||||
case .roomPlainNoAvatar:
|
||||
|
||||
@@ -34,6 +34,7 @@ enum UITestsScreenIdentifier: String {
|
||||
case bugReport
|
||||
case bugReportWithScreenshot
|
||||
case notificationSettingsScreen
|
||||
case notificationSettingsScreenMismatchConfiguration
|
||||
case onboarding
|
||||
case roomPlainNoAvatar
|
||||
case roomEncryptedWithAvatar
|
||||
|
||||
Reference in New Issue
Block a user