Fix remaining 9 UI test failures: subscription state, scroll, timing

- Replace removePersistentDomain with key-by-key removal in resetAppState
  (removePersistentDomain is unreliable on app group UserDefaults suites)
- Add explicit cache clearing in IAPManager.resetForTesting() to prevent
  stale cachedSubscriptionExpiration from restoring .subscribed state
- Use descendants(matching: .any) for upgrade_banner and subscribe_button
  queries (VStack may not match otherElements in SwiftUI)
- Add multiple swipe attempts for icon pack horizontal scroll
- Use coordinate-based drag for onboarding paged TabView advancement
- Add longer wait for Day view refresh after theme change
- Add multiple scroll attempts to find clear data button in Settings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-17 19:13:18 -06:00
parent c286294cd3
commit 9157fd2577
7 changed files with 67 additions and 19 deletions

View File

@@ -14,8 +14,12 @@ struct SettingsScreen {
var settingsHeader: XCUIElement { app.staticTexts["settings_header"] }
var customizeSegment: XCUIElement { app.buttons["Customize"] }
var upgradeBanner: XCUIElement { app.otherElements["upgrade_banner"] }
var subscribeButton: XCUIElement { app.buttons["subscribe_button"] }
var upgradeBanner: XCUIElement {
app.descendants(matching: .any).matching(identifier: "upgrade_banner").firstMatch
}
var subscribeButton: XCUIElement {
app.descendants(matching: .any).matching(identifier: "subscribe_button").firstMatch
}
var whyUpgradeButton: XCUIElement { app.buttons["why_upgrade_button"] }
var browseThemesButton: XCUIElement { app.buttons["browse_themes_button"] }
var clearDataButton: XCUIElement { app.buttons["settings_clear_data"].firstMatch }