// // 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") } }