Stabilize iOS UI test foundation and fix flaky suites

This commit is contained in:
Trey t
2026-02-17 22:24:08 -06:00
parent c28d7a59eb
commit 56ac783219
38 changed files with 543 additions and 585 deletions

View File

@@ -13,9 +13,7 @@ final class DayViewGroupingTests: BaseUITestCase {
/// TC-019: Entries are grouped by year/month section headers.
func testEntries_GroupedBySectionHeaders() {
// 1. Wait for entry list to load with seeded data
let firstEntry = app.descendants(matching: .any)
.matching(NSPredicate(format: "identifier BEGINSWITH %@", "entry_row_"))
.firstMatch
let firstEntry = app.firstEntryRow
XCTAssertTrue(
firstEntry.waitForExistence(timeout: 5),
"Entry rows should exist with week_of_moods fixture"
@@ -23,7 +21,7 @@ final class DayViewGroupingTests: BaseUITestCase {
// 2. Verify at least one section header exists
let anySectionHeader = app.descendants(matching: .any)
.matching(NSPredicate(format: "identifier BEGINSWITH %@", "day_section_"))
.matching(NSPredicate(format: "identifier BEGINSWITH %@", UITestID.Day.sectionPrefix))
.firstMatch
XCTAssertTrue(
anySectionHeader.waitForExistence(timeout: 5),