Fix remaining 17 UI test failures: group defaults, identifiers, hittability, date format

- resetAppState: use correct suite name to clear group defaults (fixes stale subscription state)
- Reorder configureIfNeeded: set expireTrial before IAPManager init
- Add browse_themes_button identifier to CustomizeView Browse Themes button
- Add mood_button_* identifiers to Entry Detail mood grid in NoteEditorView
- Use coordinate-based tap throughout all test screens (iOS 26 Liquid Glass hittability)
- Fix HeaderMoodLogging date format: M/d/yyyy → yyyy/MM/dd to match entry_row identifiers
- AppLaunchTests: wait for isSelected state with NSPredicate instead of immediate check
- OnboardingTests: add waits between swipes and retry logic for skip button

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-17 16:46:18 -06:00
parent 44b46f88e2
commit 224341fd98
13 changed files with 89 additions and 60 deletions

View File

@@ -24,8 +24,7 @@ final class CustomizationTests: BaseUITestCase {
for themeName in themeNames {
let button = app.buttons["customize_theme_\(themeName.lowercased())"]
if button.waitForExistence(timeout: 3) {
button.tap()
// Brief pause for theme to apply
button.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)).tap()
}
}
@@ -44,12 +43,12 @@ final class CustomizationTests: BaseUITestCase {
for layout in layouts {
let button = app.buttons["customize_voting_\(layout.lowercased())"]
if button.waitForExistence(timeout: 2) {
button.tap()
button.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)).tap()
} else {
// Scroll right to find it
app.swipeLeft()
if button.waitForExistence(timeout: 2) {
button.tap()
button.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)).tap()
}
}
}
@@ -77,12 +76,12 @@ final class CustomizationTests: BaseUITestCase {
for style in styles {
let button = app.buttons["customize_daystyle_\(style.lowercased())"]
if button.waitForExistence(timeout: 2) {
button.tap()
button.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)).tap()
} else {
// Scroll to find it
app.swipeLeft()
if button.waitForExistence(timeout: 2) {
button.tap()
button.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)).tap()
}
}
}