Fix custom item edit refresh and stabilize F069 UI test
This commit is contained in:
@@ -104,13 +104,25 @@ final class TripCustomItemTests: BaseUITestCase {
|
||||
// Sheet should dismiss
|
||||
editSheet.waitForDismiss()
|
||||
|
||||
// Verify updated title is visible
|
||||
let updatedItem = app.staticTexts["Updated Title"]
|
||||
// Verify edited item still exists in itinerary
|
||||
XCTAssertTrue(
|
||||
updatedItem.waitForExistence(timeout: BaseUITestCase.defaultTimeout),
|
||||
"Updated custom item title should be visible in itinerary"
|
||||
detail.customItemCell.waitForExistence(timeout: BaseUITestCase.defaultTimeout),
|
||||
"Custom item should remain visible after editing"
|
||||
)
|
||||
|
||||
// Re-open to verify updated title persisted (more reliable than global static text lookup).
|
||||
detail.tapCustomItem()
|
||||
let verifySheet = QuickAddItemSheetScreen(app: app)
|
||||
verifySheet.waitForLoad()
|
||||
|
||||
let persistedTitle = (verifySheet.titleField.value as? String) ?? ""
|
||||
XCTAssertTrue(
|
||||
persistedTitle.localizedCaseInsensitiveContains("Updated Title"),
|
||||
"Updated custom item title should persist after saving; found: '\(persistedTitle)'"
|
||||
)
|
||||
verifySheet.tapCancel()
|
||||
verifySheet.waitForDismiss()
|
||||
|
||||
captureScreenshot(named: "F069-CustomItemEdited")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user