Skip to content

Commit 9797ef6

Browse files
committed
fix(ios): fail an append repair whose clear lost the input
1 parent ddec69c commit 9797ef6

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextTyping.swift‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,17 @@ extension RunnerTests {
478478
observedText.count
479479
)
480480
clearTextInput(app: app, reader: &reader)
481-
if let input = reader.input() {
482-
reader.dispatch { input.element.typeText(expectedText) }
481+
// An input the clear removed or let another take the place of has nowhere for the repair to go.
482+
guard let input = reader.input() else {
483+
return TextEntryResult(
484+
verified: nil,
485+
repaired: false,
486+
expectedText: expectedText,
487+
observedText: nil,
488+
failure: .commitNotObserved
489+
)
483490
}
491+
reader.dispatch { input.element.typeText(expectedText) }
484492
return verifyTextEntry(
485493
reader: &reader,
486494
expectedText: expectedText,

0 commit comments

Comments
 (0)