Add F-037, F-038, F-091 UI tests; mark F-016 red (no accessibility ID)
- F-037: Route preference cards (Direct/Scenic/Balanced) selectable - F-038: Allow repeat cities toggle buttons work - F-091: Date range filter sheet opens and applies correctly - F-016: Marked RED - featured trip card buttons lack accessibility IDs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Tests the trip planning wizard: planning modes, calendar navigation,
|
||||
// sport/region selection, and planning engine results.
|
||||
// QA Sheet: F-018 through F-042, F-047; also F-030, F-031, F-032
|
||||
// QA Sheet: F-018 through F-042, F-047; also F-030, F-031, F-032, F-037, F-038
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@@ -477,6 +477,68 @@ final class TripWizardFlowTests: BaseUITestCase {
|
||||
captureScreenshot(named: "F047-WizardScroll")
|
||||
}
|
||||
|
||||
// MARK: - Route Preference (F-037)
|
||||
|
||||
/// F-037: Route preference cards (Direct/Scenic/Balanced) are selectable.
|
||||
@MainActor
|
||||
func testF037_RoutePreferenceSelection() {
|
||||
let (_, wizard) = openWizard()
|
||||
wizard.selectDateRangeMode()
|
||||
|
||||
// Scroll down to find route preference cards
|
||||
let scenicButton = app.buttons["Scenic"]
|
||||
scenicButton.scrollIntoView(in: app.scrollViews.firstMatch)
|
||||
|
||||
guard scenicButton.exists else {
|
||||
XCTFail("Scenic route preference button not found")
|
||||
return
|
||||
}
|
||||
|
||||
// Tap "Scenic" to select it
|
||||
scenicButton.tap()
|
||||
|
||||
// Verify it became selected
|
||||
XCTAssertEqual(scenicButton.value as? String, "Selected",
|
||||
"Scenic route preference should be selected after tap")
|
||||
|
||||
captureScreenshot(named: "F037-RoutePreference-Scenic")
|
||||
}
|
||||
|
||||
// MARK: - Allow Repeat Cities (F-038)
|
||||
|
||||
/// F-038: Allow repeat cities toggle buttons work.
|
||||
@MainActor
|
||||
func testF038_AllowRepeatCitiesToggle() {
|
||||
let (_, wizard) = openWizard()
|
||||
wizard.selectDateRangeMode()
|
||||
|
||||
// Scroll down to find repeat cities options
|
||||
let uniqueButton = app.buttons["No, unique cities only"]
|
||||
uniqueButton.scrollIntoView(in: app.scrollViews.firstMatch)
|
||||
|
||||
guard uniqueButton.exists else {
|
||||
XCTFail("'No, unique cities only' button not found")
|
||||
return
|
||||
}
|
||||
|
||||
// Tap to select unique cities only
|
||||
uniqueButton.tap()
|
||||
|
||||
// Verify selection
|
||||
XCTAssertEqual(uniqueButton.value as? String, "Selected",
|
||||
"'No, unique cities only' should be selected after tap")
|
||||
|
||||
// Tap "Yes, allow repeats" to switch
|
||||
let repeatButton = app.buttons["Yes, allow repeats"]
|
||||
if repeatButton.exists {
|
||||
repeatButton.tap()
|
||||
XCTAssertEqual(repeatButton.value as? String, "Selected",
|
||||
"'Yes, allow repeats' should be selected after tap")
|
||||
}
|
||||
|
||||
captureScreenshot(named: "F038-RepeatCities")
|
||||
}
|
||||
|
||||
// MARK: - All 5 Modes Available (F-018 to F-022 combined)
|
||||
|
||||
/// Verifies all 5 planning mode buttons are present in the wizard.
|
||||
|
||||
Reference in New Issue
Block a user