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:
@@ -22,31 +22,31 @@ struct TabBarScreen {
|
||||
|
||||
@discardableResult
|
||||
func tapDay() -> DayScreen {
|
||||
dayTab.tapWhenReady()
|
||||
tapTab(dayTab)
|
||||
return DayScreen(app: app)
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func tapMonth() -> TabBarScreen {
|
||||
monthTab.tapWhenReady()
|
||||
tapTab(monthTab)
|
||||
return self
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func tapYear() -> TabBarScreen {
|
||||
yearTab.tapWhenReady()
|
||||
tapTab(yearTab)
|
||||
return self
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func tapInsights() -> TabBarScreen {
|
||||
insightsTab.tapWhenReady()
|
||||
tapTab(insightsTab)
|
||||
return self
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func tapSettings() -> SettingsScreen {
|
||||
settingsTab.tapWhenReady()
|
||||
tapTab(settingsTab)
|
||||
return SettingsScreen(app: app)
|
||||
}
|
||||
|
||||
@@ -59,4 +59,13 @@ struct TabBarScreen {
|
||||
func assertTabBarVisible() {
|
||||
XCTAssertTrue(dayTab.waitForExistence(timeout: 5), "Tab bar should be visible")
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
/// Tap a tab bar button. Uses coordinate tap to avoid iOS 26 Liquid Glass
|
||||
/// overlay elements reporting buttons as not hittable.
|
||||
private func tapTab(_ tab: XCUIElement) {
|
||||
_ = tab.waitForExistence(timeout: 5)
|
||||
tab.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)).tap()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user