Fix custom item edit refresh and stabilize F069 UI test
This commit is contained in:
@@ -898,9 +898,22 @@ struct QuickAddItemSheetScreen {
|
||||
func clearAndTypeTitle(_ text: String) {
|
||||
let field = titleField
|
||||
field.waitUntilHittable().tap()
|
||||
// Triple-tap to select all existing text
|
||||
field.tap(withNumberOfTaps: 3, numberOfTouches: 1)
|
||||
|
||||
// Primary path: command-A replacement is generally the most reliable on simulator.
|
||||
field.typeKey("a", modifierFlags: .command)
|
||||
field.typeText(text)
|
||||
|
||||
// Fallback path: if replacement didn't stick, try explicit select-all and replace.
|
||||
let currentValue = (field.value as? String) ?? ""
|
||||
if !currentValue.localizedCaseInsensitiveContains(text) {
|
||||
field.tap(withNumberOfTaps: 3, numberOfTouches: 1)
|
||||
if app.menuItems["Select All"].waitForExistence(timeout: BaseUITestCase.shortTimeout) {
|
||||
app.menuItems["Select All"].tap()
|
||||
} else {
|
||||
field.typeKey("a", modifierFlags: .command)
|
||||
}
|
||||
field.typeText(text)
|
||||
}
|
||||
}
|
||||
|
||||
func tapSave() {
|
||||
|
||||
Reference in New Issue
Block a user