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:
@@ -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-090, F-092, F-094
|
||||
// QA Sheet: F-085, F-086, F-087, F-088, F-089, F-090, F-091, F-092, F-094
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@@ -191,6 +191,48 @@ final class ScheduleTests: BaseUITestCase {
|
||||
captureScreenshot(named: "F092-ScheduleEmptyState")
|
||||
}
|
||||
|
||||
// MARK: - Date Range Filter (F-091)
|
||||
|
||||
/// F-091: Date range filter sheet opens and applies.
|
||||
@MainActor
|
||||
func testF091_DateRangeFilter() {
|
||||
let home = HomeScreen(app: app)
|
||||
home.waitForLoad()
|
||||
home.switchToTab(home.scheduleTab)
|
||||
|
||||
let schedule = ScheduleScreen(app: app)
|
||||
schedule.assertLoaded()
|
||||
|
||||
// Open filter menu
|
||||
schedule.filterButton.tap()
|
||||
|
||||
// Tap "Date Range" in the menu
|
||||
let dateRangeButton = app.buttons["Date Range"]
|
||||
XCTAssertTrue(dateRangeButton.waitForExistence(timeout: BaseUITestCase.shortTimeout),
|
||||
"Date Range menu item should exist")
|
||||
dateRangeButton.tap()
|
||||
|
||||
// Date range picker sheet should appear
|
||||
let sheetTitle = app.staticTexts["Select Dates"]
|
||||
XCTAssertTrue(sheetTitle.waitForExistence(timeout: BaseUITestCase.defaultTimeout),
|
||||
"Date range picker sheet should appear")
|
||||
|
||||
// Tap "Next 7 Days" quick option
|
||||
let next7Days = app.buttons["Next 7 Days"]
|
||||
XCTAssertTrue(next7Days.exists, "Next 7 Days button should exist")
|
||||
next7Days.tap()
|
||||
|
||||
// Apply the filter
|
||||
let applyButton = app.buttons["Apply"]
|
||||
XCTAssertTrue(applyButton.exists, "Apply button should exist")
|
||||
applyButton.tap()
|
||||
|
||||
// Schedule should still function after applying date filter
|
||||
schedule.assertLoaded()
|
||||
|
||||
captureScreenshot(named: "F091-DateRangeFilter")
|
||||
}
|
||||
|
||||
// MARK: - Diagnostics (F-094)
|
||||
|
||||
/// F-094: Diagnostics button opens the diagnostics sheet.
|
||||
|
||||
@@ -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