Add XCUITest suite with 27 test files covering unmapped P1 test cases
- Add 8 new test files: HeaderMoodLogging (TC-002), DayViewGrouping (TC-019), AllDayViewStyles (TC-021), MonthViewInteraction (TC-030), PaywallGate (TC-032/039/048), AppTheme (TC-070), IconPack (TC-072), PremiumCustomization (TC-075) - Add accessibility IDs for paywall overlays, icon packs, app theme cards, and day view section headers - Add --expire-trial launch argument to UITestMode for paywall gate testing - Update QA test plan spreadsheet with XCUITest names for 14 test cases - Include existing test infrastructure: screen objects, helpers, base class, and 19 previously written test files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,7 @@ struct AddMoodHeaderView: View {
|
||||
}
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.accessibilityIdentifier(AccessibilityID.DayView.moodHeader)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
@@ -121,6 +122,7 @@ struct HorizontalVotingView: View {
|
||||
}
|
||||
.buttonStyle(MoodButtonStyle())
|
||||
.frame(maxWidth: .infinity)
|
||||
.accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName))
|
||||
.accessibilityLabel(mood.strValue)
|
||||
.accessibilityHint(String(localized: "Select this mood"))
|
||||
}
|
||||
@@ -185,6 +187,7 @@ struct CardVotingView: View {
|
||||
)
|
||||
}
|
||||
.buttonStyle(CardButtonStyle())
|
||||
.accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName))
|
||||
.accessibilityLabel(mood.strValue)
|
||||
.accessibilityHint(String(localized: "Select this mood"))
|
||||
}
|
||||
@@ -224,6 +227,7 @@ struct StackedVotingView: View {
|
||||
)
|
||||
}
|
||||
.buttonStyle(CardButtonStyle())
|
||||
.accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName))
|
||||
.accessibilityLabel(mood.strValue)
|
||||
.accessibilityHint(String(localized: "Select this mood"))
|
||||
}
|
||||
@@ -310,6 +314,7 @@ struct AuraVotingView: View {
|
||||
}
|
||||
}
|
||||
.buttonStyle(AuraButtonStyle(color: color))
|
||||
.accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName))
|
||||
.accessibilityLabel(mood.strValue)
|
||||
.accessibilityHint(String(localized: "Select this mood"))
|
||||
}
|
||||
@@ -400,6 +405,7 @@ struct OrbitVotingView: View {
|
||||
}
|
||||
.buttonStyle(OrbitButtonStyle(color: color))
|
||||
.position(x: posX, y: posY)
|
||||
.accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName))
|
||||
.accessibilityLabel(mood.strValue)
|
||||
.accessibilityHint(String(localized: "Select this mood"))
|
||||
}
|
||||
@@ -687,6 +693,7 @@ struct NeonEqualizerBar: View {
|
||||
}
|
||||
.buttonStyle(NeonBarButtonStyle(isPressed: $isPressed))
|
||||
.frame(maxWidth: .infinity)
|
||||
.accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName))
|
||||
.accessibilityLabel(mood.strValue)
|
||||
.accessibilityHint(String(localized: "Select this mood"))
|
||||
}
|
||||
|
||||
@@ -278,6 +278,7 @@ struct ThemePickerCompact: View {
|
||||
}
|
||||
}
|
||||
.buttonStyle(BorderlessButtonStyle())
|
||||
.accessibilityIdentifier(AccessibilityID.Customize.themeButton(aTheme.title))
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
@@ -331,6 +332,7 @@ struct ImagePackPickerCompact: View {
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityIdentifier(AccessibilityID.Customize.iconPackButton("\(images)"))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -379,6 +381,7 @@ struct VotingLayoutPickerCompact: View {
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityIdentifier(AccessibilityID.Customize.votingLayoutButton(layout.displayName))
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 4)
|
||||
@@ -742,6 +745,7 @@ struct DayViewStylePickerCompact: View {
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityIdentifier(AccessibilityID.Customize.dayViewStyleButton(style.displayName))
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 4)
|
||||
|
||||
@@ -214,6 +214,7 @@ struct AppThemeCard: View {
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityIdentifier(AccessibilityID.Customize.appThemeCard(theme.name))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,7 @@ extension DayView {
|
||||
defaultSectionHeader(month: month, year: year)
|
||||
}
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.DaySection.header(month: month, year: year))
|
||||
}
|
||||
|
||||
private func defaultSectionHeader(month: Int, year: Int) -> some View {
|
||||
|
||||
@@ -34,10 +34,12 @@ struct EmptyHomeView: View {
|
||||
.padding()
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundColor(textColor)
|
||||
.accessibilityIdentifier(AccessibilityID.DayView.emptyStateNoData)
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.DayView.emptyState)
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
|
||||
@@ -93,6 +93,7 @@ struct EntryListView: View {
|
||||
}
|
||||
}
|
||||
.accessibilityElement(children: .combine)
|
||||
.accessibilityIdentifier(AccessibilityID.DayView.entryRow(dateString: cachedYearMonthDayDigits))
|
||||
.accessibilityLabel(accessibilityDescription)
|
||||
.accessibilityHint(isMissing ? String(localized: "Tap to log mood for this day") : String(localized: "Tap to view or edit"))
|
||||
.accessibilityAddTraits(.isButton)
|
||||
|
||||
@@ -28,6 +28,7 @@ struct InsightsView: View {
|
||||
Text("Insights")
|
||||
.font(.title.weight(.bold))
|
||||
.foregroundColor(textColor)
|
||||
.accessibilityIdentifier(AccessibilityID.Insights.header)
|
||||
Spacer()
|
||||
|
||||
// AI badge
|
||||
@@ -168,6 +169,7 @@ struct InsightsView: View {
|
||||
Spacer()
|
||||
}
|
||||
.background(theme.currentTheme.bg)
|
||||
.accessibilityIdentifier(AccessibilityID.Paywall.insightsOverlay)
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showSubscriptionStore) {
|
||||
|
||||
@@ -28,26 +28,31 @@ struct MainTabView: View {
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_main"), systemImage: "list.dash")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.day)
|
||||
|
||||
monthView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_month"), systemImage: "calendar")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.month)
|
||||
|
||||
yearView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_filter"), systemImage: "line.3.horizontal.decrease.circle")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.year)
|
||||
|
||||
insightsView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_insights"), systemImage: "lightbulb.fill")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.insights)
|
||||
|
||||
SettingsTabView()
|
||||
.tabItem {
|
||||
Label("Settings", systemImage: "gear")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.settings)
|
||||
}
|
||||
.accentColor(textColor)
|
||||
.sheet(isPresented: $needsOnboarding, onDismiss: { }, content: {
|
||||
|
||||
@@ -327,6 +327,7 @@ struct MonthView: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(theme.currentTheme.bg)
|
||||
.frame(maxHeight: .infinity, alignment: .bottom)
|
||||
.accessibilityIdentifier(AccessibilityID.Paywall.monthOverlay)
|
||||
} else if iapManager.shouldShowTrialWarning && !demoManager.isDemoMode {
|
||||
VStack {
|
||||
Spacer()
|
||||
|
||||
@@ -45,6 +45,7 @@ struct NoteEditorView: View {
|
||||
.frame(maxHeight: .infinity)
|
||||
.scrollContentBackground(.hidden)
|
||||
.padding(.horizontal, 4)
|
||||
.accessibilityIdentifier(AccessibilityID.NoteEditor.textEditor)
|
||||
|
||||
// Character count
|
||||
HStack {
|
||||
@@ -63,6 +64,7 @@ struct NoteEditorView: View {
|
||||
Button("Cancel") {
|
||||
dismiss()
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.NoteEditor.cancelButton)
|
||||
}
|
||||
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
@@ -71,6 +73,7 @@ struct NoteEditorView: View {
|
||||
}
|
||||
.disabled(isSaving || noteText.count > maxCharacters)
|
||||
.fontWeight(.semibold)
|
||||
.accessibilityIdentifier(AccessibilityID.NoteEditor.saveButton)
|
||||
}
|
||||
|
||||
ToolbarItemGroup(placement: .keyboard) {
|
||||
@@ -197,11 +200,13 @@ struct EntryDetailView: View {
|
||||
.background(Color(.systemGroupedBackground))
|
||||
.navigationTitle("Entry Details")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.accessibilityIdentifier(AccessibilityID.EntryDetail.sheet)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
Button("Done") {
|
||||
dismiss()
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.EntryDetail.doneButton)
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showNoteEditor) {
|
||||
@@ -345,6 +350,7 @@ struct EntryDetailView: View {
|
||||
RoundedRectangle(cornerRadius: 16)
|
||||
.fill(Color(.systemBackground))
|
||||
)
|
||||
.accessibilityIdentifier(AccessibilityID.EntryDetail.moodGrid)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,6 +370,7 @@ struct EntryDetailView: View {
|
||||
.font(.subheadline)
|
||||
.fontWeight(.medium)
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.EntryDetail.noteButton)
|
||||
}
|
||||
|
||||
Button {
|
||||
@@ -399,6 +406,7 @@ struct EntryDetailView: View {
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityIdentifier(AccessibilityID.EntryDetail.noteArea)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,6 +503,7 @@ struct EntryDetailView: View {
|
||||
)
|
||||
}
|
||||
.padding(.top, 8)
|
||||
.accessibilityIdentifier(AccessibilityID.EntryDetail.deleteButton)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ struct SettingsTabView: View {
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.top, 8)
|
||||
.accessibilityIdentifier(AccessibilityID.Settings.header)
|
||||
|
||||
// Upgrade Banner (only show if not subscribed)
|
||||
if !iapManager.isSubscribed && !iapManager.bypassSubscription {
|
||||
@@ -123,6 +124,7 @@ struct UpgradeBannerView: View {
|
||||
.stroke(Color.accentColor, lineWidth: 1.5)
|
||||
)
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Settings.whyUpgradeButton)
|
||||
|
||||
// Subscribe button
|
||||
Button {
|
||||
@@ -138,6 +140,7 @@ struct UpgradeBannerView: View {
|
||||
.fill(Color.pink)
|
||||
)
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Settings.subscribeButton)
|
||||
}
|
||||
}
|
||||
.padding(14)
|
||||
@@ -145,6 +148,7 @@ struct UpgradeBannerView: View {
|
||||
RoundedRectangle(cornerRadius: 14)
|
||||
.fill(colorScheme == .dark ? Color(.systemGray6) : Color(.systemGray6).opacity(0.5))
|
||||
)
|
||||
.accessibilityIdentifier(AccessibilityID.Settings.upgradeBanner)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -827,6 +827,7 @@ struct SettingsContentView: View {
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Settings.clearDataButton)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
}
|
||||
@@ -1073,6 +1074,7 @@ struct SettingsContentView: View {
|
||||
.foregroundColor(textColor)
|
||||
})
|
||||
.accessibilityHint(String(localized: "View the app introduction again"))
|
||||
.accessibilityIdentifier(AccessibilityID.Settings.showOnboardingButton)
|
||||
.padding()
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
@@ -1168,6 +1170,7 @@ struct SettingsContentView: View {
|
||||
}
|
||||
))
|
||||
.labelsHidden()
|
||||
.accessibilityIdentifier(AccessibilityID.Settings.analyticsToggle)
|
||||
.accessibilityLabel("Share Analytics")
|
||||
.accessibilityHint("Toggle anonymous usage analytics")
|
||||
}
|
||||
@@ -1903,6 +1906,7 @@ struct SettingsView: View {
|
||||
}
|
||||
))
|
||||
.labelsHidden()
|
||||
.accessibilityIdentifier(AccessibilityID.Settings.analyticsToggle)
|
||||
.accessibilityLabel("Share Analytics")
|
||||
.accessibilityHint("Toggle anonymous usage analytics")
|
||||
}
|
||||
|
||||
@@ -263,6 +263,7 @@ struct YearView: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(theme.currentTheme.bg)
|
||||
.frame(maxHeight: .infinity, alignment: .bottom)
|
||||
.accessibilityIdentifier(AccessibilityID.Paywall.yearOverlay)
|
||||
} else if iapManager.shouldShowTrialWarning && !demoManager.isDemoMode {
|
||||
VStack {
|
||||
Spacer()
|
||||
|
||||
Reference in New Issue
Block a user