diff --git a/Signal/src/ViewControllers/AppSettings/AboutTableViewController.m b/Signal/src/ViewControllers/AppSettings/AboutTableViewController.m index 89ff9ab09..2b2bdf672 100644 --- a/Signal/src/ViewControllers/AppSettings/AboutTableViewController.m +++ b/Signal/src/ViewControllers/AppSettings/AboutTableViewController.m @@ -58,6 +58,7 @@ [informationSection addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_LEGAL_TERMS_CELL", @"table cell label") + accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"terms") actionBlock:^{ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:kLegalTermsUrlString]]; @@ -68,6 +69,7 @@ OWSTableSection *helpSection = [OWSTableSection new]; helpSection.headerTitle = NSLocalizedString(@"SETTINGS_HELP_HEADER", @""); [helpSection addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_SUPPORT", @"") + accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"support") actionBlock:^{ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://support.signal.org"]]; diff --git a/Signal/src/ViewControllers/AppSettings/AdvancedSettingsTableViewController.m b/Signal/src/ViewControllers/AppSettings/AdvancedSettingsTableViewController.m index fb4c72b6a..7369ffa93 100644 --- a/Signal/src/ViewControllers/AppSettings/AdvancedSettingsTableViewController.m +++ b/Signal/src/ViewControllers/AppSettings/AdvancedSettingsTableViewController.m @@ -89,16 +89,21 @@ NS_ASSUME_NONNULL_BEGIN OWSTableSection *loggingSection = [OWSTableSection new]; loggingSection.headerTitle = NSLocalizedString(@"LOGGING_SECTION", nil); [loggingSection addItem:[OWSTableItem switchItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_DEBUGLOG", @"") - isOnBlock:^{ - return [OWSPreferences isLoggingEnabled]; - } - target:weakSelf - selector:@selector(didToggleEnableLogSwitch:)]]; + accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"enable_debug_log") + isOnBlock:^{ + return [OWSPreferences isLoggingEnabled]; + } + isEnabledBlock:^{ + return YES; + } + target:weakSelf + selector:@selector(didToggleEnableLogSwitch:)]]; if ([OWSPreferences isLoggingEnabled]) { [loggingSection addItem:[OWSTableItem actionItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_SUBMIT_DEBUGLOG", @"") + accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"submit_debug_log") actionBlock:^{ OWSLogInfo(@"Submitting debug logs"); [DDLog flushLog]; @@ -112,6 +117,8 @@ NS_ASSUME_NONNULL_BEGIN pushNotificationsSection.headerTitle = NSLocalizedString(@"PUSH_REGISTER_TITLE", @"Used in table section header and alert view title contexts"); [pushNotificationsSection addItem:[OWSTableItem actionItemWithText:NSLocalizedString(@"REREGISTER_FOR_PUSH", nil) + accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER( + self, @"reregister_push_notifications") actionBlock:^{ [weakSelf syncPushTokens]; }]]; @@ -180,6 +187,7 @@ NS_ASSUME_NONNULL_BEGIN [censorshipSection addItem:[OWSTableItem switchItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_CENSORSHIP_CIRCUMVENTION", @"Label for the 'manual censorship circumvention' switch.") + accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"censorship_circumvention") isOnBlock:isCensorshipCircumventionOnBlock isEnabledBlock:isManualCensorshipCircumventionOnEnabledBlock target:weakSelf diff --git a/Signal/src/ViewControllers/AppSettings/OWSLinkedDevicesTableViewController.m b/Signal/src/ViewControllers/AppSettings/OWSLinkedDevicesTableViewController.m index 6c9a157c2..42e1da037 100644 --- a/Signal/src/ViewControllers/AppSettings/OWSLinkedDevicesTableViewController.m +++ b/Signal/src/ViewControllers/AppSettings/OWSLinkedDevicesTableViewController.m @@ -327,6 +327,7 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1; cell.detailTextLabel.text = NSLocalizedString(@"LINK_NEW_DEVICE_SUBTITLE", @"Subheading for 'Link New Device' navigation"); cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + cell.accessibilityIdentifier = SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"add"); return cell; } else if (indexPath.section == OWSLinkedDevicesTableViewControllerSectionExistingDevices) { OWSDeviceTableViewCell *cell = diff --git a/SignalMessaging/utils/OWSPreferences.m b/SignalMessaging/utils/OWSPreferences.m index 287dada8f..b10238e2e 100644 --- a/SignalMessaging/utils/OWSPreferences.m +++ b/SignalMessaging/utils/OWSPreferences.m @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN NSString *NSStringForNotificationType(NotificationType value) { - switch (notificationType) { + switch (value) { case NotificationNamePreview: return @"NotificationNamePreview"; case NotificationNameNoPreview: