feat: add XCUITest suite with 10 critical flow tests and QA test plan
Add comprehensive UI test infrastructure with Page Object pattern, accessibility identifiers, UI test mode (--ui-testing, --reset-state, --disable-animations), and 10 passing tests covering app launch, tab navigation, trip wizard, trip saving, settings, schedule, and accessibility at XXXL Dynamic Type. Also adds a 229-case QA test plan Excel workbook for manual QA handoff. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
47
SportsTimeUITests/Tests/TabNavigationTests.swift
Normal file
47
SportsTimeUITests/Tests/TabNavigationTests.swift
Normal file
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// TabNavigationTests.swift
|
||||
// SportsTimeUITests
|
||||
//
|
||||
// Verifies navigation through all 5 tabs.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class TabNavigationTests: BaseUITestCase {
|
||||
|
||||
/// Navigates through all 5 tabs and asserts each one loads.
|
||||
@MainActor
|
||||
func testTabNavigationCycle() {
|
||||
let home = HomeScreen(app: app)
|
||||
home.waitForLoad()
|
||||
|
||||
// Schedule tab
|
||||
home.switchToTab(home.scheduleTab)
|
||||
let schedule = ScheduleScreen(app: app)
|
||||
schedule.assertLoaded()
|
||||
|
||||
// My Trips tab
|
||||
home.switchToTab(home.myTripsTab)
|
||||
let myTrips = MyTripsScreen(app: app)
|
||||
myTrips.assertEmpty()
|
||||
|
||||
// Progress tab (Pro-gated, but UI test mode forces Pro)
|
||||
home.switchToTab(home.progressTab)
|
||||
// Just verify the tab switched without crash
|
||||
let progressNav = app.navigationBars.firstMatch
|
||||
XCTAssertTrue(progressNav.waitForExistence(timeout: BaseUITestCase.defaultTimeout),
|
||||
"Progress tab should load")
|
||||
|
||||
// Settings tab
|
||||
home.switchToTab(home.settingsTab)
|
||||
let settings = SettingsScreen(app: app)
|
||||
settings.assertLoaded()
|
||||
|
||||
// Return home
|
||||
home.switchToTab(home.homeTab)
|
||||
XCTAssertTrue(home.startPlanningButton.waitForExistence(timeout: BaseUITestCase.shortTimeout),
|
||||
"Should return to Home tab")
|
||||
|
||||
captureScreenshot(named: "TabNavigation-ReturnHome")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user