Fix 4 flaky UI tests for iOS 26 compatibility
- AppLaunchTests/StabilityTests: Increase assertTabSelected timeout to 8s for iOS 26 Liquid Glass delayed isSelected state updates - DeepLinkTests: Detect SubscriptionStoreView container instead of text labels, since Apple's native view shows "Subscription Unavailable" in test storefront - SettingsActionTests: Check for empty state after clearing data, bump Settings header timeout to 8s Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,10 +45,14 @@ final class SettingsActionTests: BaseUITestCase {
|
||||
tabBar.tapDay()
|
||||
|
||||
// App should remain usable after clearing data.
|
||||
assertDayContentVisible(timeout: 10)
|
||||
// After a full clear, Day view may show mood header, entry rows, or empty state.
|
||||
let hasEntry = app.firstEntryRow.waitForExistence(timeout: 10)
|
||||
let hasMoodHeader = app.element(UITestID.Day.moodHeader).waitForExistence(timeout: 2)
|
||||
let hasEmptyState = app.element(UITestID.Day.emptyStateNoData).waitForExistence(timeout: 2)
|
||||
XCTAssertTrue(hasEntry || hasMoodHeader || hasEmptyState,
|
||||
"Day view should show entries, mood header, or empty state after clearing data")
|
||||
|
||||
// Clear action should not crash the app, even if the resulting day content
|
||||
// is rehydrated by app-specific defaults/placeholders.
|
||||
// Clear action should not crash the app.
|
||||
XCTAssertTrue(app.tabBars.firstMatch.exists, "App should remain responsive after clearing data")
|
||||
|
||||
captureScreenshot(name: "data_cleared")
|
||||
|
||||
Reference in New Issue
Block a user