Stabilize iOS UI test foundation and fix flaky suites
This commit is contained in:
@@ -13,9 +13,7 @@ final class EntryDeleteTests: BaseUITestCase {
|
||||
/// TC-025: Delete a mood entry from the detail sheet.
|
||||
func testDeleteEntry_FromDetail() {
|
||||
// Wait for entry to appear
|
||||
let firstEntry = app.descendants(matching: .any)
|
||||
.matching(NSPredicate(format: "identifier BEGINSWITH %@", "entry_row_"))
|
||||
.firstMatch
|
||||
let firstEntry = app.firstEntryRow
|
||||
|
||||
guard firstEntry.waitForExistence(timeout: 8) else {
|
||||
XCTFail("No entry row found from seeded data")
|
||||
@@ -37,8 +35,8 @@ final class EntryDeleteTests: BaseUITestCase {
|
||||
|
||||
// The entry should no longer be visible (or empty state should show)
|
||||
// Give UI time to update
|
||||
let moodHeader = app.otherElements["mood_header"]
|
||||
let noDataText = app.staticTexts["empty_state_no_data"]
|
||||
let moodHeader = app.element(UITestID.Day.moodHeader)
|
||||
let noDataText = app.element(UITestID.Day.emptyStateNoData)
|
||||
|
||||
let headerReappeared = moodHeader.waitForExistence(timeout: 5)
|
||||
let noDataAppeared = noDataText.waitForExistence(timeout: 2)
|
||||
|
||||
Reference in New Issue
Block a user