Add F-015, F-076, F-094 UI tests for home refresh, trip detail, diagnostics

- F-015: Featured trips refresh button works without crash
- F-076: Trip detail loads correctly with single-stop trip
- F-094: Schedule diagnostics sheet opens from filter menu

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-20 01:03:12 -06:00
parent 56c17e79a4
commit ab1d7bc6b6
4 changed files with 91 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
// SportsTimeUITests
//
// Tests for the Home tab: hero card, start planning, toolbar button, recent trips, polls.
// QA Sheet: F-012, F-013, F-014, F-017, F-018, F-019, F-020, F-081, F-083, F-084
// QA Sheet: F-012, F-013, F-014, F-015, F-017, F-018, F-019, F-020, F-081, F-083, F-084
//
import XCTest
@@ -59,6 +59,42 @@ final class HomeTests: BaseUITestCase {
captureScreenshot(named: "F020-ToolbarCreateTrip")
}
/// F-015: Featured trips refresh button reloads suggestions.
@MainActor
func testF015_FeaturedTripsRefreshButton() {
let home = HomeScreen(app: app)
home.waitForLoad()
// Wait for featured trips section to load
let section = home.featuredTripsSection
if !section.waitForExistence(timeout: BaseUITestCase.longTimeout) {
section.scrollIntoView(in: app.scrollViews.firstMatch, maxScrolls: 15)
}
guard section.exists else {
XCTFail("Featured trips section not found — cannot test refresh")
return
}
// Find the refresh button by accessibility label
let refreshButton = app.buttons["Refresh trips"]
refreshButton.scrollIntoView(in: app.scrollViews.firstMatch)
XCTAssertTrue(refreshButton.exists,
"Refresh trips button should exist in featured section")
// 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")
captureScreenshot(named: "F015-FeaturedTripsRefresh")
}
/// F-014: Featured trips carousel loads and is visible.
@MainActor
func testF014_FeaturedTripsCarouselLoads() {