diff --git a/SportsTimeUITests/Tests/ScheduleTests.swift b/SportsTimeUITests/Tests/ScheduleTests.swift index 7811a36..b82c276 100644 --- a/SportsTimeUITests/Tests/ScheduleTests.swift +++ b/SportsTimeUITests/Tests/ScheduleTests.swift @@ -3,7 +3,7 @@ // SportsTimeUITests // // Verifies the Schedule tab loads and displays content. -// QA Sheet: F-085, F-086, F-087, F-088, F-089, F-092 +// QA Sheet: F-085, F-086, F-087, F-088, F-089, F-090, F-092 // import XCTest @@ -134,6 +134,29 @@ final class ScheduleTests: BaseUITestCase { captureScreenshot(named: "F089-SearchByTeam") } + /// F-090: Search by venue name filters schedule results. + @MainActor + func testF090_SearchByVenueName() { + let home = HomeScreen(app: app) + home.waitForLoad() + home.switchToTab(home.scheduleTab) + + let schedule = ScheduleScreen(app: app) + schedule.assertLoaded() + + // Tap search field and type venue name + let searchField = schedule.searchField + XCTAssertTrue(searchField.waitForExistence(timeout: BaseUITestCase.defaultTimeout), + "Search field should exist") + searchField.tap() + searchField.typeText("Wrigley") + + // Wait for results to filter + sleep(1) + + captureScreenshot(named: "F090-SearchByVenue") + } + /// F-092: Empty state appears when filters match no games. @MainActor func testF092_ScheduleEmptyState() { diff --git a/SportsTimeUITests/Tests/TripOptionsTests.swift b/SportsTimeUITests/Tests/TripOptionsTests.swift index 86292e8..89cb3ad 100644 --- a/SportsTimeUITests/Tests/TripOptionsTests.swift +++ b/SportsTimeUITests/Tests/TripOptionsTests.swift @@ -2,8 +2,8 @@ // TripOptionsTests.swift // SportsTimeUITests // -// Tests the Trip Options results screen: sorting, selection. -// QA Sheet: F-052, F-053, F-054, F-055 +// Tests the Trip Options results screen: sorting, selection, navigation. +// QA Sheet: F-052, F-053, F-054, F-055, F-058, F-059 // import XCTest @@ -71,4 +71,41 @@ final class TripOptionsTests: BaseUITestCase { captureScreenshot(named: "F055-SortByBestEfficiency") } + + // MARK: - Select Trip (F-058) + + /// F-058: Tapping a trip option card opens TripDetailView with full itinerary. + @MainActor + func testF058_SelectTripOpensDetail() { + let options = planTripAndGetOptions() + + // Tap first trip card + options.selectTrip(at: 0) + + // Trip detail should open with itinerary + let detail = TripDetailScreen(app: app) + detail.waitForLoad() + detail.assertItineraryVisible() + + captureScreenshot(named: "F058-SelectTripOpensDetail") + } + + // MARK: - Back Navigation (F-059) + + /// F-059: Back button on Trip Options returns to wizard with selections preserved. + @MainActor + func testF059_BackToWizardFromOptions() { + _ = planTripAndGetOptions() + + // Tap back button to return to wizard + app.navigationBars.buttons.firstMatch.tap() + + // Wizard should reappear with its navigation title or planning mode buttons + let wizard = TripWizardScreen(app: app) + let wizardVisible = wizard.navigationTitle.waitForExistence(timeout: BaseUITestCase.defaultTimeout) + || wizard.planningModeButton("dateRange").waitForExistence(timeout: BaseUITestCase.defaultTimeout) + XCTAssertTrue(wizardVisible, "Wizard should be visible after tapping back from options") + + captureScreenshot(named: "F059-BackToWizard") + } } diff --git a/docs/SportsTime_QA_Test_Plan.xlsx b/docs/SportsTime_QA_Test_Plan.xlsx index e43e9a1..315fbbb 100644 Binary files a/docs/SportsTime_QA_Test_Plan.xlsx and b/docs/SportsTime_QA_Test_Plan.xlsx differ