Complete accessibility identifier coverage across all 152 project files
Exhaustive file-by-file audit of every Swift file in the project (iOS app, Watch app, Widget extension). Every interactive UI element — buttons, toggles, pickers, links, menus, tap gestures, text editors, color pickers, photo pickers — now has an accessibilityIdentifier for XCUITest automation. 46 files changed across Shared/, Onboarding/, Watch App/, and Widget targets. Added ~100 new ID definitions covering settings debug controls, export/photo views, sharing templates, customization subviews, onboarding flows, tip modals, widget voting buttons, and watch mood buttons.
This commit is contained in:
@@ -120,6 +120,45 @@ enum AccessibilityID {
|
||||
static let reminderTimePicker = "settings_reminder_time_picker"
|
||||
static let reminderSaveButton = "settings_reminder_save"
|
||||
static let reminderCancelButton = "settings_reminder_cancel"
|
||||
static let reminderTimeButton = "settings_reminder_time"
|
||||
static let changeTrialDateButton = "settings_change_trial_date"
|
||||
static let trialDatePickerDoneButton = "settings_trial_date_done"
|
||||
static let trialDatePicker = "settings_trial_date_picker"
|
||||
static let paywallPreviewButton = "settings_paywall_preview"
|
||||
static let tipsPreviewButton = "settings_tips_preview"
|
||||
static let testNotificationsButton = "settings_test_notifications"
|
||||
static let exportWidgetsButton = "settings_export_widgets"
|
||||
static let exportVotingLayoutsButton = "settings_export_voting_layouts"
|
||||
static let exportWatchViewsButton = "settings_export_watch_views"
|
||||
static let exportInsightsButton = "settings_export_insights"
|
||||
static let generateScreenshotsButton = "settings_generate_screenshots"
|
||||
static let addTestDataButton = "settings_add_test_data"
|
||||
static let deleteHealthKitButton = "settings_delete_health_kit"
|
||||
static let locationAlertOpenSettingsButton = "settings_location_open_settings"
|
||||
static let locationAlertCancelButton = "settings_location_cancel"
|
||||
static let fontAwesomeLink = "settings_font_awesome_link"
|
||||
static let chartsLink = "settings_charts_link"
|
||||
static let exportDataButton = "settings_export_data"
|
||||
static let closeButton = "settings_close"
|
||||
static let resetLaunchDateButton = "settings_reset_launch_date"
|
||||
static let fixWeekdayButton = "settings_fix_weekday"
|
||||
static let whyBackgroundModeButton = "settings_why_bg_mode"
|
||||
static let exportLegacyButton = "settings_export_legacy"
|
||||
static let importButton = "settings_import"
|
||||
static let randomIconsButton = "settings_random_icons"
|
||||
static let doneButton = "settings_done"
|
||||
static let specialThanksButton = "settings_special_thanks"
|
||||
}
|
||||
|
||||
// MARK: - TipModal
|
||||
enum TipModal {
|
||||
static let dismissButton = "tip_modal_dismiss"
|
||||
static let resetTipsButton = "tip_modal_reset_tips"
|
||||
static let tipsEnabledToggle = "tip_modal_tips_enabled"
|
||||
static let doneButton = "tip_modal_done"
|
||||
static func tipPreviewButton(_ index: Int) -> String {
|
||||
"tip_modal_preview_\(index)"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Customize
|
||||
@@ -129,6 +168,7 @@ enum AccessibilityID {
|
||||
static let appThemePickerDoneButton = "apptheme_picker_done"
|
||||
static let appThemePreviewCancelButton = "apptheme_preview_cancel"
|
||||
static let appThemePreviewApplyButton = "apptheme_preview_apply"
|
||||
static let widgetHowToLink = "customize_widget_how_to_link"
|
||||
static func themeButton(_ name: String) -> String {
|
||||
"customize_theme_\(name.lowercased())"
|
||||
}
|
||||
@@ -147,6 +187,31 @@ enum AccessibilityID {
|
||||
static func appThemeCard(_ name: String) -> String {
|
||||
"apptheme_card_\(name.lowercased())"
|
||||
}
|
||||
static func customWidget(_ index: Int) -> String {
|
||||
"customize_widget_\(index)"
|
||||
}
|
||||
static let customWidgetAdd = "customize_widget_add"
|
||||
static func shapeOption(_ name: String) -> String {
|
||||
"customize_shape_\(name.lowercased())"
|
||||
}
|
||||
static let shapeRefresh = "customize_shape_refresh"
|
||||
static func imagePackOption(_ name: String) -> String {
|
||||
"customize_imagepack_option_\(name.lowercased())"
|
||||
}
|
||||
static func personalityPackOption(_ name: String) -> String {
|
||||
"customize_personalitypack_option_\(name.lowercased())"
|
||||
}
|
||||
static func celebrationAnimationButton(_ name: String) -> String {
|
||||
"customize_celebration_\(name.lowercased())"
|
||||
}
|
||||
static let manageSubscriptionButton = "customize_manage_subscription"
|
||||
static let unlockPremiumButton = "customize_unlock_premium"
|
||||
static func dayFilterButton(_ day: String) -> String {
|
||||
"customize_day_filter_\(day.lowercased())"
|
||||
}
|
||||
static func iconButton(_ name: String) -> String {
|
||||
"customize_icon_\(name.lowercased())"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Paywall
|
||||
@@ -173,21 +238,32 @@ enum AccessibilityID {
|
||||
static let monthSection = "insights_month_section"
|
||||
static let yearSection = "insights_year_section"
|
||||
static let allTimeSection = "insights_all_time_section"
|
||||
static let expandCollapseButton = "insights_expand_collapse"
|
||||
}
|
||||
|
||||
// MARK: - Month View
|
||||
enum MonthView {
|
||||
static let grid = "month_grid"
|
||||
static let shareButton = "month_share_button"
|
||||
static let statsToggleButton = "month_stats_toggle"
|
||||
static let settingsButton = "month_settings_button"
|
||||
static func dayCell(dateString: String) -> String {
|
||||
"month_day_cell_\(dateString)"
|
||||
}
|
||||
static let debugDemoToggle = "month_debug_demo_toggle"
|
||||
}
|
||||
|
||||
// MARK: - Month Detail
|
||||
enum MonthDetail {
|
||||
static let shareButton = "month_detail_share"
|
||||
static let deleteButton = "month_detail_delete"
|
||||
static let cancelButton = "month_detail_cancel"
|
||||
static func moodButton(_ mood: String) -> String {
|
||||
"month_detail_mood_\(mood.lowercased())"
|
||||
}
|
||||
static func entryCell(_ dateString: String) -> String {
|
||||
"month_detail_entry_\(dateString)"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Year View
|
||||
@@ -198,6 +274,7 @@ enum AccessibilityID {
|
||||
static let statsSection = "year_stats_section"
|
||||
static func cardHeader(year: Int) -> String { "year_card_header_\(year)" }
|
||||
static let shareButton = "year_share_button"
|
||||
static let debugDemoToggle = "year_debug_demo_toggle"
|
||||
}
|
||||
|
||||
// MARK: - Onboarding
|
||||
@@ -213,12 +290,23 @@ enum AccessibilityID {
|
||||
static let subscribeButton = "onboarding_subscribe_button"
|
||||
static let skipButton = "onboarding_skip_button"
|
||||
static let nextButton = "onboarding_next_button"
|
||||
static let timePicker = "onboarding_time_picker"
|
||||
static let wrapupContinue = "onboarding_wrapup_continue"
|
||||
static let titleOptionButton = "onboarding_title_option"
|
||||
static func styleThemeButton(_ name: String) -> String {
|
||||
"onboarding_style_theme_\(name.lowercased())"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Reports
|
||||
enum Reports {
|
||||
static let segmentedPicker = "reports_segmented_picker"
|
||||
static let dateRangePicker = "reports_date_range_picker"
|
||||
static let previousMonthButton = "reports_previous_month"
|
||||
static let nextMonthButton = "reports_next_month"
|
||||
static func dayCell(dateString: String) -> String {
|
||||
"reports_day_cell_\(dateString)"
|
||||
}
|
||||
static let quickSummaryButton = "reports_quick_summary_button"
|
||||
static let detailedReportButton = "reports_detailed_report_button"
|
||||
static let generateButton = "reports_generate_button"
|
||||
@@ -229,6 +317,8 @@ enum AccessibilityID {
|
||||
static let minimumEntriesWarning = "reports_minimum_entries_warning"
|
||||
static let exportDataButton = "reports_export_data_button"
|
||||
static let retryButton = "reports_retry_button"
|
||||
static let privacyShareButton = "reports_privacy_share"
|
||||
static let privacyCancelButton = "reports_privacy_cancel"
|
||||
}
|
||||
|
||||
// MARK: - Purchase / Subscription
|
||||
@@ -239,6 +329,11 @@ enum AccessibilityID {
|
||||
static let subscribeButton = "purchase_subscribe"
|
||||
}
|
||||
|
||||
// MARK: - Subscription Store
|
||||
enum SubscriptionStore {
|
||||
static let closeButton = "subscription_store_close"
|
||||
}
|
||||
|
||||
// MARK: - IAP Warning
|
||||
enum IAPWarning {
|
||||
static let subscribeButton = "iap_warning_subscribe"
|
||||
@@ -249,6 +344,7 @@ enum AccessibilityID {
|
||||
static let unlockButton = "lock_screen_unlock"
|
||||
static let tryAgainButton = "lock_screen_try_again"
|
||||
static let cancelButton = "lock_screen_cancel"
|
||||
static let passcodeUnlockButton = "lock_screen_passcode_unlock"
|
||||
static func passcodeButton(_ digit: Int) -> String {
|
||||
"lock_screen_passcode_\(digit)"
|
||||
}
|
||||
@@ -260,6 +356,135 @@ enum AccessibilityID {
|
||||
static let dismissArea = "full_screen_photo_dismiss"
|
||||
}
|
||||
|
||||
// MARK: - Export
|
||||
enum Export {
|
||||
static let cancelButton = "export_cancel"
|
||||
static let exportButton = "export_export"
|
||||
static let alertOKButton = "export_alert_ok"
|
||||
static func formatButton(_ format: String) -> String {
|
||||
"export_format_\(format.lowercased())"
|
||||
}
|
||||
static func rangeButton(_ range: String) -> String {
|
||||
"export_range_\(range.lowercased())"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Photo Picker
|
||||
enum PhotoPicker {
|
||||
static let cameraButton = "photo_picker_camera"
|
||||
static let cancelButton = "photo_picker_cancel"
|
||||
static let closeButton = "photo_picker_close"
|
||||
static let shareButton = "photo_picker_share"
|
||||
static let deleteButton = "photo_picker_delete"
|
||||
static let deleteConfirmButton = "photo_picker_delete_confirm"
|
||||
static let deleteCancelButton = "photo_picker_delete_cancel"
|
||||
static let photosPicker = "photo_picker_library"
|
||||
static let photoImage = "photo_picker_image"
|
||||
static let menuButton = "photo_picker_menu"
|
||||
}
|
||||
|
||||
// MARK: - Sharing
|
||||
enum Sharing {
|
||||
static let exitButton = "sharing_exit"
|
||||
static let shareButton = "sharing_share"
|
||||
static func moodMenuButton(_ mood: String) -> String {
|
||||
"sharing_mood_menu_\(mood.lowercased())"
|
||||
}
|
||||
static let moodMenu = "sharing_mood_menu"
|
||||
static func templateButton(_ description: String) -> String {
|
||||
"sharing_template_\(description.lowercased().replacingOccurrences(of: " ", with: "_"))"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Sharing Templates
|
||||
enum SharingTemplate {
|
||||
static let dismissButton = "sharing_template_dismiss"
|
||||
static let shareButton = "sharing_template_share"
|
||||
static let moodMenu = "sharing_template_mood_menu"
|
||||
static func moodMenuButton(_ mood: String) -> String {
|
||||
"sharing_template_mood_menu_\(mood.lowercased())"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Custom Widget
|
||||
enum CustomWidget {
|
||||
static func colorPicker(_ name: String) -> String {
|
||||
"custom_widget_color_\(name.lowercased())"
|
||||
}
|
||||
static let leftEyeButton = "custom_widget_left_eye"
|
||||
static let rightEyeButton = "custom_widget_right_eye"
|
||||
static let mouthButton = "custom_widget_mouth"
|
||||
static func backgroundOption(_ index: Int) -> String {
|
||||
"custom_widget_bg_\(index)"
|
||||
}
|
||||
static let randomBackgroundButton = "custom_widget_random_bg"
|
||||
static let shuffleButton = "custom_widget_shuffle"
|
||||
static let saveButton = "custom_widget_save"
|
||||
static let useButton = "custom_widget_use"
|
||||
static let deleteButton = "custom_widget_delete"
|
||||
static func imageOption(_ name: String) -> String {
|
||||
"custom_widget_image_\(name.lowercased())"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Debug / Preview
|
||||
enum Debug {
|
||||
static let animationDoneButton = "debug_animation_done"
|
||||
static func animationCard(_ name: String) -> String {
|
||||
"debug_animation_\(name.lowercased())"
|
||||
}
|
||||
static func debugMoodButton(_ mood: String) -> String {
|
||||
"debug_mood_\(mood.lowercased())"
|
||||
}
|
||||
static let paywallPreviewDoneButton = "debug_paywall_done"
|
||||
static let viewFullPaywallButton = "debug_view_full_paywall"
|
||||
static func paywallStyleOption(_ name: String) -> String {
|
||||
"debug_paywall_style_\(name.lowercased())"
|
||||
}
|
||||
static let liveActivityResetButton = "debug_live_activity_reset"
|
||||
static let liveActivityToggleButton = "debug_live_activity_toggle"
|
||||
static let liveActivityRecordButton = "debug_live_activity_record"
|
||||
static let liveActivityDismissButton = "debug_live_activity_dismiss"
|
||||
static let liveActivityExportButton = "debug_live_activity_export"
|
||||
}
|
||||
|
||||
// MARK: - Sample Entry
|
||||
enum SampleEntry {
|
||||
static let refreshButton = "sample_entry_refresh"
|
||||
}
|
||||
|
||||
// MARK: - Switchable View
|
||||
enum SwitchableView {
|
||||
static let headerToggle = "switchable_view_header_toggle"
|
||||
}
|
||||
|
||||
// MARK: - Neon Mood Button (voting layout)
|
||||
enum NeonMoodButton {
|
||||
static func id(for mood: String) -> String {
|
||||
"neon_mood_button_\(mood.lowercased())"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - App Alerts
|
||||
enum AppAlert {
|
||||
static let storageUnavailableOK = "app_alert_storage_ok"
|
||||
}
|
||||
|
||||
// MARK: - Watch
|
||||
enum Watch {
|
||||
static func moodButton(_ mood: String) -> String {
|
||||
"watch_mood_button_\(mood.lowercased())"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Widget
|
||||
enum Widget {
|
||||
static func voteMoodButton(_ mood: String) -> String {
|
||||
"widget_vote_mood_\(mood.lowercased())"
|
||||
}
|
||||
static let subscribeLink = "widget_subscribe_link"
|
||||
}
|
||||
|
||||
// MARK: - Common
|
||||
enum Common {
|
||||
static let lockScreen = "lock_screen"
|
||||
|
||||
Reference in New Issue
Block a user