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