Files
Sportstime/SportsTimeUITests/Tests/AccessibilityTests.swift
Trey t d53f222489 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>
2026-02-16 16:23:59 -06:00

47 lines
1.5 KiB
Swift

//
// AccessibilityTests.swift
// SportsTimeUITests
//
// Smoke test for Dynamic Type accessibility at XXXL text size.
//
import XCTest
final class AccessibilityTests: BaseUITestCase {
/// Verifies the entry flow is usable at AX XXL text size.
@MainActor
func testLargeDynamicTypeEntryFlow() {
// Re-launch with large Dynamic Type
app.terminate()
app.launchArguments = [
"--ui-testing",
"--disable-animations",
"--reset-state",
"-UIPreferredContentSizeCategoryName",
"UICTContentSizeCategoryAccessibilityXXXL"
]
app.launch()
let home = HomeScreen(app: app)
home.waitForLoad()
// At XXXL text the button may be pushed below the fold; scroll into view
home.startPlanningButton.scrollIntoView(in: app.scrollViews.firstMatch)
XCTAssertTrue(home.startPlanningButton.isHittable,
"Start Planning should remain hittable at large Dynamic Type")
// Open wizard and verify planning mode options are reachable
home.tapStartPlanning()
let wizard = TripWizardScreen(app: app)
wizard.waitForLoad()
let dateRangeMode = wizard.planningModeButton("dateRange")
dateRangeMode.scrollIntoView(in: app.scrollViews.firstMatch)
XCTAssertTrue(dateRangeMode.isHittable,
"Planning mode should be hittable at large Dynamic Type")
captureScreenshot(named: "Accessibility-LargeType")
}
}