fix: 5 failing UI tests — scroll direction, sport availability race, launch args, demo toggle conflict

- Screens.swift: selectPlanningMode scrolls UP (modes are at top of wizard)
- TripWizardFlowTests: F040 selects sport before dates to avoid async
  availability check disabling MLB for December off-season
- SportsTimeUITests: add --ui-testing/--disable-animations/--reset-state
  launch args to accessibility, demo, and manual flow tests
- Demo test: remove -DemoMode flag that caused double-toggle (demo
  auto-selects + manual taps toggled sports/regions off)
- Manual test: replace blind swipes with scrollIntoView + wait-for-enabled
  for Plan button; use waitForExistence for trip card selection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-17 21:34:57 -06:00
parent 9b0cb96638
commit 1488be7c1f
3 changed files with 149 additions and 146 deletions

View File

@@ -273,14 +273,20 @@ final class TripWizardFlowTests: BaseUITestCase {
let (_, wizard) = openWizard()
wizard.selectDateRangeMode()
// Pick December 2026 MLB off-season, no games expected
// Select sport BEFORE dates so the async sport-availability check
// (triggered by date selection) doesn't disable the button.
wizard.selectSport("mlb")
// Pick December 2026 MLB off-season, no games expected.
// Scroll up to the dates section first since sport step is below dates.
wizard.monthLabel.scrollIntoView(in: app.scrollViews.firstMatch, direction: .up)
wizard.selectDateRange(
targetMonth: "December",
targetYear: "2026",
startDay: "2026-12-01",
endDay: "2026-12-07"
)
wizard.selectSport("mlb")
wizard.selectRegion("central")
wizard.tapPlanTrip()