commit c19cfabd6d0209f9a753615a1f191ad6e99726e9
parent d050f57a84f7c52bb74ab9d7a8452329aeaa559a
Author: triesap <tyson@radroots.org>
Date: Thu, 11 Jun 2026 18:10:47 -0700
ui: add stable test accessibility anchors
- identify the app bootstrap and setup surfaces for UI tests
- identify the field dashboard tab container
- identify feed, market, and settings roots
- keep test source ownership outside the app repository
Diffstat:
6 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/Radroots/App/AppEntry.swift b/Radroots/App/AppEntry.swift
@@ -24,6 +24,7 @@ public struct AppEntry<Main: View>: View {
}
}
}
+ .accessibilityIdentifier("field_ios.app_entry")
}
}
@@ -33,5 +34,6 @@ private struct SplashView: View {
Color(.systemBackground).ignoresSafeArea()
ProgressView().controlSize(.large)
}
+ .accessibilityIdentifier("field_ios.bootstrap")
}
}
diff --git a/Radroots/Views/HomeView.swift b/Radroots/Views/HomeView.swift
@@ -29,5 +29,6 @@ struct HomeView: View {
.tabItem { Label("Settings", systemImage: "gearshape.fill") }
.tag(HomeTab.settings)
}
+ .accessibilityIdentifier("field_ios.home.tabs")
}
}
diff --git a/Radroots/Views/MarketView.swift b/Radroots/Views/MarketView.swift
@@ -83,6 +83,7 @@ struct MarketView: View {
}
.listStyle(.plain)
.navigationTitle("Market")
+ .accessibilityIdentifier("field_ios.market")
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
if vm.isLoading {
diff --git a/Radroots/Views/PostFeedView.swift b/Radroots/Views/PostFeedView.swift
@@ -61,6 +61,7 @@ struct PostFeedView: View {
}
.listStyle(.insetGrouped)
.inlineNavigationTitle("Feed")
+ .accessibilityIdentifier("field_ios.feed")
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
if vm.isLoading { ProgressView() }
diff --git a/Radroots/Views/SettingsView.swift b/Radroots/Views/SettingsView.swift
@@ -60,6 +60,7 @@ struct SettingsView: View {
}
.listStyle(.insetGrouped)
.inlineNavigationTitle("Settings")
+ .accessibilityIdentifier("field_ios.settings")
}
private func exportSecretHex() {
diff --git a/Radroots/Views/SetupView.swift b/Radroots/Views/SetupView.swift
@@ -35,6 +35,7 @@ struct SetupView: View {
}
.animation(.easeInOut(duration: 0.25), value: step)
.toolbar(.hidden, for: .navigationBar)
+ .accessibilityIdentifier("field_ios.setup")
}
private func generateKey() {
@@ -120,8 +121,10 @@ private struct SetupWelcomeView: View {
}
.buttonStyle(.borderedProminent)
.controlSize(.large)
+ .accessibilityIdentifier("field_ios.setup.continue")
}
.padding()
+ .accessibilityIdentifier("field_ios.setup.welcome")
}
}
@@ -175,6 +178,7 @@ private struct SetupKeyView: View {
.buttonStyle(.borderedProminent)
.controlSize(.large)
.disabled(isWorking)
+ .accessibilityIdentifier("field_ios.setup.generate_key")
Button {
onImport()
@@ -188,6 +192,7 @@ private struct SetupKeyView: View {
.buttonStyle(.bordered)
.controlSize(.large)
.disabled(isWorking)
+ .accessibilityIdentifier("field_ios.setup.import_secret")
}
.padding(.top, 4)
@@ -199,5 +204,6 @@ private struct SetupKeyView: View {
.multilineTextAlignment(.center)
}
.padding()
+ .accessibilityIdentifier("field_ios.setup.key")
}
}