// // DayViewGroupingTests.swift // Tests iOS // // Day view section header grouping tests. // import XCTest final class DayViewGroupingTests: BaseUITestCase { override var seedFixture: String? { "week_of_moods" } /// TC-019: Entries are grouped by year/month section headers. func testEntries_GroupedBySectionHeaders() { // Wait for entry list to load with seeded data app.firstEntryRow.waitForExistenceOrFail( timeout: navigationTimeout, message: "Entry rows should exist with week_of_moods fixture" ) // The week_of_moods fixture contains entries in the current month. // Verify the section header for the current month/year exists. let now = Date() let calendar = Calendar.current let month = calendar.component(.month, from: now) let year = calendar.component(.year, from: now) let expectedHeaderID = "day_section_\(month)_\(year)" let currentMonthHeader = app.element(expectedHeaderID) currentMonthHeader.waitForExistenceOrFail( timeout: navigationTimeout, message: "Section header '\(expectedHeaderID)' should exist for current month" ) } }