// // AppLaunchTests.swift // Tests iOS // // App launch and tab bar navigation tests. // import XCTest final class AppLaunchTests: BaseUITestCase { override var seedFixture: String? { "week_of_moods" } /// Verify the app launches and the tab bar is visible. func testAppLaunches_TabBarVisible() { let tabBar = TabBarScreen(app: app) tabBar.assertVisible() } /// Navigate to Month tab and verify it loads. func testTabNavigation_Month() { let tabBar = TabBarScreen(app: app) tabBar.tapMonth() let monthGrid = app.element(UITestID.Month.grid) monthGrid.waitForExistenceOrFail(timeout: navigationTimeout, message: "Month grid should be visible after tapping Month tab") } /// Navigate to Year tab and verify it loads. func testTabNavigation_Year() { let tabBar = TabBarScreen(app: app) tabBar.tapYear() let heatmap = app.element(UITestID.Year.heatmap) heatmap.waitForExistenceOrFail(timeout: navigationTimeout, message: "Year heatmap should be visible after tapping Year tab") } /// Navigate to Insights tab and verify it loads. func testTabNavigation_Insights() { let tabBar = TabBarScreen(app: app) tabBar.tapInsights() let insightsHeader = app.element(UITestID.Insights.header) insightsHeader.waitForExistenceOrFail(timeout: navigationTimeout, message: "Insights header should be visible after tapping Insights tab") } /// Navigate to Settings tab and verify it loads. func testTabNavigation_Settings() { let tabBar = TabBarScreen(app: app) let settingsScreen = tabBar.tapSettings() settingsScreen.assertVisible() } /// Navigate away from Day and return -- Day screen loads. func testTabNavigation_ReturnToDay() { let tabBar = TabBarScreen(app: app) tabBar.tapSettings() let dayScreen = tabBar.tapDay() dayScreen.assertVisible() } }