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:
@@ -109,7 +109,8 @@ struct CreateWidgetView: View {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.blue)
|
||||
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.shuffleButton)
|
||||
|
||||
Button(action: {
|
||||
AnalyticsManager.shared.track(.widgetCreated)
|
||||
UserDefaultsStore.saveCustomWidget(widgetModel: customWidget, inUse: false)
|
||||
@@ -127,7 +128,8 @@ struct CreateWidgetView: View {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.green)
|
||||
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.saveButton)
|
||||
|
||||
Button(action: {
|
||||
AnalyticsManager.shared.track(.widgetUsed)
|
||||
UserDefaultsStore.saveCustomWidget(widgetModel: customWidget, inUse: true)
|
||||
@@ -145,7 +147,8 @@ struct CreateWidgetView: View {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.pink)
|
||||
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.useButton)
|
||||
|
||||
if customWidget.isSaved {
|
||||
Button(action: {
|
||||
AnalyticsManager.shared.track(.widgetDeleted)
|
||||
@@ -163,6 +166,7 @@ struct CreateWidgetView: View {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.orange)
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.deleteButton)
|
||||
}
|
||||
}
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
@@ -178,6 +182,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "background"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("bg"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
@@ -188,6 +193,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "inner"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("inner"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
@@ -198,6 +204,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "outline"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("stroke"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
}
|
||||
@@ -210,6 +217,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "left_eye"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("leftEye"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
@@ -220,6 +228,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "right_eye"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("rightEye"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
@@ -230,6 +239,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "mouth"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("mouth"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
}
|
||||
@@ -250,16 +260,19 @@ struct CreateWidgetView: View {
|
||||
.frame(minWidth: 10, idealWidth: 40, maxWidth: 40,
|
||||
minHeight: 10, idealHeight: 40, maxHeight: 40,
|
||||
alignment: .center)
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.backgroundOption(CustomWidgetBackGroundOptions.selectable.firstIndex(of: bg) ?? 0))
|
||||
.onTapGesture {
|
||||
update(background: bg)
|
||||
}
|
||||
}
|
||||
mixBG
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.randomBackgroundButton)
|
||||
.onTapGesture {
|
||||
update(background: .random)
|
||||
}
|
||||
Divider()
|
||||
ColorPicker("", selection: $customWidget.bgOverlayColor)
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("bgOverlay"))
|
||||
}
|
||||
.padding()
|
||||
.background(
|
||||
@@ -270,6 +283,7 @@ struct CreateWidgetView: View {
|
||||
var faceImageOptions: some View {
|
||||
HStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_view_left_eye"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.leftEyeButton)
|
||||
.onTapGesture(perform: {
|
||||
showLeftEyeImagePicker.toggle()
|
||||
})
|
||||
@@ -278,6 +292,7 @@ struct CreateWidgetView: View {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
Divider()
|
||||
Text(String(localized: "create_widget_view_right_eye"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.rightEyeButton)
|
||||
.onTapGesture(perform: {
|
||||
showRightEyeImagePicker.toggle()
|
||||
})
|
||||
@@ -285,6 +300,7 @@ struct CreateWidgetView: View {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
Divider()
|
||||
Text(String(localized: "create_widget_view_mouth"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.mouthButton)
|
||||
.onTapGesture(perform: {
|
||||
showMuthImagePicker.toggle()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user