// // SecondaryTabTests.swift // Tests iOS // // Month, Year, and Insights tab navigation tests. // import XCTest final class SecondaryTabTests: BaseUITestCase { override var seedFixture: String? { "week_of_moods" } /// Navigate to Month tab and verify the month grid loads. func testMonthTab_LoadsContent() { 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" ) captureScreenshot(name: "month_tab") } /// Navigate to Year tab and verify the stats section loads. func testYearTab_LoadsContent() { let tabBar = TabBarScreen(app: app) tabBar.tapYear() let statsSection = app.element(UITestID.Year.statsSection) statsSection.waitForExistenceOrFail( timeout: navigationTimeout, message: "Year stats section should be visible after tapping Year tab" ) captureScreenshot(name: "year_tab") } /// Navigate to Insights tab and verify the header is visible. func testInsightsTab_ShowsHeader() { let tabBar = TabBarScreen(app: app) tabBar.tapInsights() let insightsHeader = app.element(UITestID.Insights.header) insightsHeader.waitForExistenceOrFail( timeout: navigationTimeout, message: "Insights header should be visible" ) captureScreenshot(name: "insights_tab") } }