feat: expand XCUITest coverage to 54 QA scenarios with accessibility IDs and fix test failures

Add 22 new UI tests across 8 test files covering Home, Schedule, Progress,
Settings, TabNavigation, TripSaving, and TripOptions. Add accessibility
identifiers to 11 view files for test element discovery. Fix sport chip
assertion logic (all sports start selected, tap deselects), scroll container
issues on iOS 26 nested ScrollViews, toggle interaction, and delete trip flow.
Update QA coverage map from 32 to 54 automated test cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-16 19:44:22 -06:00
parent d53f222489
commit dc142bd14b
25 changed files with 1637 additions and 102 deletions

View File

@@ -3,15 +3,16 @@
// SportsTimeUITests
//
// Verifies app boot, bootstrap, and initial screen rendering.
// QA Sheet: F-001 through F-003
//
import XCTest
final class AppLaunchTests: BaseUITestCase {
/// Verifies the app boots, shows the home screen, and all 5 tabs are present.
/// F-001: Cold launch on first install hero card + all tabs visible.
@MainActor
func testAppLaunchShowsHomeWithAllTabs() {
func testF001_ColdLaunchShowsHomeWithAllTabs() {
let home = HomeScreen(app: app)
home.waitForLoad()
@@ -22,12 +23,12 @@ final class AppLaunchTests: BaseUITestCase {
// Assert: All tabs present
home.assertTabBarVisible()
captureScreenshot(named: "HomeScreen-Launch")
captureScreenshot(named: "F001-HomeScreen-Launch")
}
/// Verifies the bootstrap loading indicator disappears and content renders.
/// F-002: Bootstrap loads bundled data Start Planning is interactable.
@MainActor
func testBootstrapCompletesWithContent() {
func testF002_BootstrapCompletesWithContent() {
let home = HomeScreen(app: app)
home.waitForLoad()
@@ -35,4 +36,24 @@ final class AppLaunchTests: BaseUITestCase {
XCTAssertTrue(home.startPlanningButton.isHittable,
"Start Planning should be hittable after bootstrap")
}
/// F-006: Background to foreground resume data intact.
@MainActor
func testF006_BackgroundForegroundResume() {
let home = HomeScreen(app: app)
home.waitForLoad()
// Background the app
XCUIDevice.shared.press(.home)
sleep(2)
// Foreground
app.activate()
// Assert: Home still loaded, no re-bootstrap
XCTAssertTrue(
home.startPlanningButton.waitForExistence(timeout: BaseUITestCase.defaultTimeout),
"App should resume without re-bootstrapping"
)
}
}