- Add 8 new test files: HeaderMoodLogging (TC-002), DayViewGrouping (TC-019), AllDayViewStyles (TC-021), MonthViewInteraction (TC-030), PaywallGate (TC-032/039/048), AppTheme (TC-070), IconPack (TC-072), PremiumCustomization (TC-075) - Add accessibility IDs for paywall overlays, icon packs, app theme cards, and day view section headers - Add --expire-trial launch argument to UITestMode for paywall gate testing - Update QA test plan spreadsheet with XCUITest names for 14 test cases - Include existing test infrastructure: screen objects, helpers, base class, and 19 previously written test files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
53 lines
1.6 KiB
Swift
53 lines
1.6 KiB
Swift
//
|
|
// AppLaunchTests.swift
|
|
// Tests iOS
|
|
//
|
|
// App launch and tab bar navigation tests.
|
|
//
|
|
|
|
import XCTest
|
|
|
|
final class AppLaunchTests: BaseUITestCase {
|
|
override var seedFixture: String? { "empty" }
|
|
|
|
/// Verify the app launches to the Day tab and all 5 tabs are visible.
|
|
func testAppLaunches_TabBarVisible() {
|
|
let tabBar = TabBarScreen(app: app)
|
|
tabBar.assertTabBarVisible()
|
|
|
|
// All 5 tabs should exist
|
|
XCTAssertTrue(tabBar.dayTab.exists, "Day tab should exist")
|
|
XCTAssertTrue(tabBar.monthTab.exists, "Month tab should exist")
|
|
XCTAssertTrue(tabBar.yearTab.exists, "Year tab should exist")
|
|
XCTAssertTrue(tabBar.insightsTab.exists, "Insights tab should exist")
|
|
XCTAssertTrue(tabBar.settingsTab.exists, "Settings tab should exist")
|
|
|
|
captureScreenshot(name: "app_launched")
|
|
}
|
|
|
|
/// Navigate through every tab and verify each loads.
|
|
func testTabNavigation_AllTabsAccessible() {
|
|
let tabBar = TabBarScreen(app: app)
|
|
|
|
// Month tab
|
|
tabBar.tapMonth()
|
|
XCTAssertTrue(tabBar.monthTab.isSelected, "Month tab should be selected")
|
|
|
|
// Year tab
|
|
tabBar.tapYear()
|
|
XCTAssertTrue(tabBar.yearTab.isSelected, "Year tab should be selected")
|
|
|
|
// Insights tab
|
|
tabBar.tapInsights()
|
|
XCTAssertTrue(tabBar.insightsTab.isSelected, "Insights tab should be selected")
|
|
|
|
// Settings tab
|
|
tabBar.tapSettings()
|
|
XCTAssertTrue(tabBar.settingsTab.isSelected, "Settings tab should be selected")
|
|
|
|
// Back to Day
|
|
tabBar.tapDay()
|
|
XCTAssertTrue(tabBar.dayTab.isSelected, "Day tab should be selected")
|
|
}
|
|
}
|