Fix 23 failing UI tests: accessibility hierarchy, test mode, and interaction issues
App fixes: - Remove empty_state identifier from EmptyHomeView VStack (was overriding mood_header) - Fix resetAppState to set needsOnboarding=true (fresh state) instead of false - Set bypassSubscription explicitly based on launch arg presence (was defaulting to true in DEBUG) Test fixes: - TabBarScreen: use coordinate tap to avoid iOS 26 Liquid Glass hittability issues - SettingsScreen: use coordinate tap for segments, handle Settings label ambiguity with tab bar - EntryDetailScreen: use mood_button_ identifiers instead of label matching (was matching entry rows) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,9 +18,9 @@ struct EntryDetailScreen {
|
||||
var moodGrid: XCUIElement { app.otherElements["entry_detail_mood_grid"] }
|
||||
|
||||
/// Mood buttons inside the detail sheet's mood grid.
|
||||
/// These use accessibilityLabel (the mood name text), not identifiers.
|
||||
func moodButton(label: String) -> XCUIElement {
|
||||
app.buttons.matching(NSPredicate(format: "label CONTAINS[cd] %@", label)).firstMatch
|
||||
/// Match by the mood_button_ identifier prefix to avoid matching entry rows.
|
||||
func moodButton(for mood: MoodChoice) -> XCUIElement {
|
||||
app.buttons["mood_button_\(mood.rawValue)"]
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
@@ -30,7 +30,7 @@ struct EntryDetailScreen {
|
||||
}
|
||||
|
||||
func selectMood(_ mood: MoodChoice) {
|
||||
let button = moodButton(label: mood.rawValue.capitalized)
|
||||
let button = moodButton(for: mood)
|
||||
button.tapWhenReady()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user