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:
48
SportsTimeUITests/Tests/SettingsTests.swift
Normal file
48
SportsTimeUITests/Tests/SettingsTests.swift
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// SettingsTests.swift
|
||||
// SportsTimeUITests
|
||||
//
|
||||
// Verifies the Settings screen loads, displays version, and shows all sections.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class SettingsTests: BaseUITestCase {
|
||||
|
||||
/// Verifies the Settings screen loads and displays the app version.
|
||||
@MainActor
|
||||
func testSettingsShowsVersion() {
|
||||
let home = HomeScreen(app: app)
|
||||
home.waitForLoad()
|
||||
home.switchToTab(home.settingsTab)
|
||||
|
||||
let settings = SettingsScreen(app: app)
|
||||
settings.assertLoaded()
|
||||
settings.assertVersionDisplayed()
|
||||
|
||||
captureScreenshot(named: "Settings-Version")
|
||||
}
|
||||
|
||||
/// Verifies key sections are present in Settings.
|
||||
@MainActor
|
||||
func testSettingsSectionsPresent() {
|
||||
let home = HomeScreen(app: app)
|
||||
home.waitForLoad()
|
||||
home.switchToTab(home.settingsTab)
|
||||
|
||||
let settings = SettingsScreen(app: app)
|
||||
settings.assertLoaded()
|
||||
|
||||
// Assert: Key sections exist
|
||||
XCTAssertTrue(settings.subscriptionSection.waitForExistence(
|
||||
timeout: BaseUITestCase.shortTimeout),
|
||||
"Subscription section should exist")
|
||||
|
||||
// SwiftUI List renders as UICollectionView on iOS 26
|
||||
settings.privacySection.scrollIntoView(in: app.collectionViews.firstMatch)
|
||||
XCTAssertTrue(settings.privacySection.exists, "Privacy section should exist")
|
||||
|
||||
settings.aboutSection.scrollIntoView(in: app.collectionViews.firstMatch)
|
||||
XCTAssertTrue(settings.aboutSection.exists, "About section should exist")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user