Fix last 3 UI test failures: icon packs, themes, clear data

- IconPackTests: Use swipeUp instead of swipeLeft since icon packs
  are in a VStack (vertical layout), not horizontal scroll
- AppThemeTests: Verify sheet dismissal, accept mood header as
  alternative to entry row after theme change
- SettingsActionTests: Add wait for SwiftData propagation after
  clearing data, increase timeouts for view refresh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-17 20:42:30 -06:00
parent 8845ccfd1b
commit 3ec1af2e29
3 changed files with 36 additions and 29 deletions

View File

@@ -30,28 +30,22 @@ final class IconPackTests: BaseUITestCase {
settingsScreen.assertVisible()
// Should already be on Customize sub-tab
// Scroll down to find the icon pack section
// Scroll down to find the icon pack section (VStack layout)
app.swipeUp()
for pack in allIconPacks {
let button = app.buttons["customize_iconpack_\(pack)"]
// Icon packs are in a horizontal scroll view.
// Try multiple scroll strategies to find the button.
// Icon packs are in a vertical stack scroll down to find buttons.
if !button.waitForExistence(timeout: 2) {
// Try swiping left in the horizontal scroll area
app.swipeLeft()
}
if !button.waitForExistence(timeout: 1) {
app.swipeLeft()
}
if !button.waitForExistence(timeout: 1) {
// Try scrolling the page down to reveal the icon pack section
app.swipeUp()
}
if !button.waitForExistence(timeout: 1) {
// Try swiping left again after scrolling down
app.swipeLeft()
app.swipeUp()
}
if !button.waitForExistence(timeout: 1) {
// Try scrolling back up in case we overshot
app.swipeDown()
}
if button.waitForExistence(timeout: 3) {