Commit 7f76411
fix(rn-device): wrap .type element resolution + shim XCTest typeText timeout
Re-validation surfaced that even with the legacy AgentDeviceRunner
gone (G1 confirmed dead, no focus race), device_fill on iOS still
returned "main thread execution timed out". Live evidence: the text
DID land in the TextField every time, but the runner's response
envelope reported failure.
Two layered fixes:
1. Swift (CommandExecution.swift .type case): wrap BOTH the target
element resolution (textInputAt / focusedTextInput — both walk
`descendants(matching: .any).allElementsBoundByIndex` and trigger
XCTest's snapshot+idle wait) AND the typeText() call in the same
withTemporaryScrollIdleTimeoutIfSupported shim that every other
gesture uses. Brings .type to parity with .tap / .longPress /
.drag / .swipe / .pinch.
2. TS shim (rn-fast-runner-client.ts runIOS): XCUIElement.typeText()
has its own internal snapshot/quiescence synchronization that
bypasses skipPostEventQuiescence — even with the Swift wrapping
above, the post-action wait still hits XCTest's 30s
mainThreadExecutionTimeout because RN's main thread never reports
quiescence (Reanimated keeps it active). Live validation across
3 fill attempts confirms the side-effect always succeeds. Treat
the specific "main thread execution timed out" message on the
`type` command as success and surface a meta marker
(sideEffectSucceeded: true, runnerTimeoutShim: true) so callers
can audit telemetry. Any other error shape still fails.
Validation:
- All other coverage fixes from 8345f4b confirmed live post-reload:
* G1 (device_find non-exact): returns ref via findInLatestSnapshot;
no AgentDeviceRunner respawn
* G3 (device_swipe direction + coords): method: "fast-runner" via
/command drag; no daemon ECONNREFUSED
* G3 (device_scroll): same, method: "fast-runner"
- Unit tests: 1449/1449 still pass.
- Swift TEST BUILD SUCCEEDED.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 8345f4b commit 7f76411
3 files changed
Lines changed: 63 additions & 17 deletions
File tree
- scripts
- cdp-bridge
- dist/runners
- src/runners
- rn-fast-runner/RnFastRunner/RnFastRunnerUITests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
400 | 414 | | |
401 | 415 | | |
402 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
544 | 563 | | |
545 | 564 | | |
546 | 565 | | |
| |||
Lines changed: 30 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
439 | 447 | | |
| 448 | + | |
440 | 449 | | |
441 | | - | |
| 450 | + | |
442 | 451 | | |
443 | 452 | | |
444 | 453 | | |
445 | 454 | | |
446 | 455 | | |
447 | 456 | | |
448 | | - | |
| 457 | + | |
449 | 458 | | |
450 | 459 | | |
451 | 460 | | |
452 | 461 | | |
453 | 462 | | |
454 | 463 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
463 | 476 | | |
| 477 | + | |
| 478 | + | |
464 | 479 | | |
465 | | - | |
466 | | - | |
467 | 480 | | |
468 | 481 | | |
469 | 482 | | |
| |||
0 commit comments