Harden test harness and UI suite

This commit is contained in:
Trey t
2026-04-03 15:30:54 -05:00
parent 87b9971714
commit 0fa3db5401
13 changed files with 319 additions and 55 deletions

View File

@@ -85,12 +85,10 @@ final class HomeTests: BaseUITestCase {
// Tap refresh and verify no crash
refreshButton.tap()
// Wait briefly for reload
sleep(2)
// Featured section should still exist after refresh
XCTAssertTrue(section.exists,
"Featured trips section should remain after refresh")
waitUntil(timeout: BaseUITestCase.longTimeout, "Featured trips section should remain after refresh") {
section.exists && refreshButton.exists
}
captureScreenshot(named: "F015-FeaturedTripsRefresh")
}
@@ -307,14 +305,17 @@ final class HomeTests: BaseUITestCase {
home.waitForLoad()
home.switchToTab(home.myTripsTab)
// Wait briefly for My Trips content to load
sleep(1)
let myTrips = MyTripsScreen(app: app)
waitUntil(timeout: BaseUITestCase.longTimeout, "My Trips should load before refreshing") {
myTrips.emptyState.exists || myTrips.tripCard(0).exists || self.app.staticTexts["Group Polls"].exists
}
// Pull down to refresh
app.swipeDown(velocity: .slow)
// Wait for any refresh to complete
sleep(2)
waitUntil(timeout: BaseUITestCase.longTimeout, "My Trips should still be loaded after pull to refresh") {
myTrips.emptyState.exists || myTrips.tripCard(0).exists || self.app.staticTexts["Group Polls"].exists
}
// Verify the tab is still functional (no crash)
let groupPolls = app.staticTexts["Group Polls"]