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:
@@ -66,11 +66,9 @@ enum UITestMode {
|
||||
GroupUserDefaults.groupDefaults.set(false, forKey: UserDefaultsStore.Keys.needsOnboarding.rawValue)
|
||||
}
|
||||
|
||||
if bypassSubscription {
|
||||
#if DEBUG
|
||||
IAPManager.shared.bypassSubscription = true
|
||||
#endif
|
||||
}
|
||||
#if DEBUG
|
||||
IAPManager.shared.bypassSubscription = bypassSubscription
|
||||
#endif
|
||||
|
||||
if expireTrial {
|
||||
// Set firstLaunchDate to 31 days ago so the 30-day trial is expired
|
||||
@@ -93,8 +91,8 @@ enum UITestMode {
|
||||
if let bundleId = Bundle.main.bundleIdentifier {
|
||||
defaults.removePersistentDomain(forName: bundleId)
|
||||
}
|
||||
// Reset key defaults explicitly
|
||||
defaults.set(false, forKey: UserDefaultsStore.Keys.needsOnboarding.rawValue)
|
||||
// Reset key defaults explicitly (true = fresh install state where onboarding is needed)
|
||||
defaults.set(true, forKey: UserDefaultsStore.Keys.needsOnboarding.rawValue)
|
||||
defaults.set(0, forKey: UserDefaultsStore.Keys.votingLayoutStyle.rawValue) // horizontal
|
||||
defaults.synchronize()
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ struct EmptyHomeView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.DayView.emptyState)
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
|
||||
Reference in New Issue
Block a user