Add F-058, F-059, F-090 UI tests for trip options and schedule search
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user