Stabilize iOS UI test foundation and fix flaky suites
This commit is contained in:
@@ -14,8 +14,8 @@ final class EmptyStateTests: BaseUITestCase {
|
||||
func testEmptyState_ShowsNoDataMessage() {
|
||||
// The app should show either the mood header (voting prompt) or
|
||||
// the empty state text. Either way, it should not crash.
|
||||
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)
|
||||
|
||||
// At least one of these should be visible
|
||||
let headerExists = moodHeader.waitForExistence(timeout: 5)
|
||||
@@ -27,9 +27,7 @@ final class EmptyStateTests: BaseUITestCase {
|
||||
)
|
||||
|
||||
// No entry rows should exist
|
||||
let entryRows = app.descendants(matching: .any)
|
||||
.matching(NSPredicate(format: "identifier BEGINSWITH %@", "entry_row_"))
|
||||
.firstMatch
|
||||
let entryRows = app.firstEntryRow
|
||||
XCTAssertFalse(
|
||||
entryRows.waitForExistence(timeout: 2),
|
||||
"No entry rows should exist in empty state"
|
||||
|
||||
Reference in New Issue
Block a user