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

@@ -12,10 +12,10 @@ struct NoteEditorScreen {
// MARK: - Elements
var navigationTitle: XCUIElement { app.navigationBars["Journal Note"] }
var textEditor: XCUIElement { app.textViews["note_editor_text"] }
var saveButton: XCUIElement { app.buttons["note_editor_save"] }
var cancelButton: XCUIElement { app.buttons["note_editor_cancel"] }
var navigationTitle: XCUIElement { app.navigationBars.firstMatch }
var textEditor: XCUIElement { app.textViews[UITestID.NoteEditor.text] }
var saveButton: XCUIElement { app.buttons[UITestID.NoteEditor.save] }
var cancelButton: XCUIElement { app.buttons[UITestID.NoteEditor.cancel] }
// MARK: - Actions
@@ -47,7 +47,7 @@ struct NoteEditorScreen {
func assertVisible(file: StaticString = #file, line: UInt = #line) {
XCTAssertTrue(
navigationTitle.waitForExistence(timeout: 5),
textEditor.waitForExistence(timeout: 5),
"Note editor should be visible",
file: file, line: line
)
@@ -55,7 +55,7 @@ struct NoteEditorScreen {
func assertDismissed(file: StaticString = #file, line: UInt = #line) {
XCTAssertTrue(
navigationTitle.waitForDisappearance(timeout: 5),
textEditor.waitForDisappearance(timeout: 5),
"Note editor should be dismissed",
file: file, line: line
)