Skip to content

Skip the one-second floor on present-element waits in UI tests - #88

Merged
RISCfuture merged 2 commits into
mainfrom
ui-tests/fewer-waits
Nov 18, 2026
Merged

RISCfuture merged 2 commits into
mainfrom
ui-tests/fewer-waits

Conversation

@RISCfuture

Copy link
Copy Markdown
Contributor

waitForExistence(timeout:) costs about 1.07 s even when the element is
already present, against 0.015 s for exists. Route the page objects and
tests through XCUITestKit's wait(timeout:) so the release that makes it
exists-first removes that floor from about 100 call sites.

Also drop waits that cannot pay off:

  • scrollToElement checks exists instead of a 0.3 s wait per swipe.
  • tapUntilSelected returns as soon as its tap selects the element.
  • waitForKeyboardFocus returns when the field already has focus.
  • Absence checks test exists before waiting for non-existence, and the
    no-results search waits on the previous row disappearing instead of
    timing out on a row that never exists.
  • The thrust schedule toggle and deleted scenario absence checks no
    longer wait out a timeout (or, for the scenario, scroll the whole
    list) to prove a negative.
  • The nav-data loader replaces the welcome screen and the tab view, and
    UI tests seed current data so it never appears; the defer-button
    probes at launch and after Continue skip their 2 s and 3 s timeouts
    when the welcome screen or the payload field shows it is not up.

Commits

  • Skip the one-second floor on present-element waits in UI tests
  • Require XCUITestKit 1.4.0

Validation

UI tests run locally on iOS 27.2 simulators against XCUITestKit 1.4.0's code: 49 of 49 pass on iPhone 17 Pro, iPad Pro 13-inch (M5) and iPhone Duo, with no retries.

🤖 Generated with Claude Code

RISCfuture and others added 2 commits November 17, 2026 17:07
waitForExistence(timeout:) costs about 1.07 s even when the element is
already present, against 0.015 s for exists. Route the page objects and
tests through XCUITestKit's wait(timeout:) so the release that makes it
exists-first removes that floor from about 100 call sites.

Also drop waits that cannot pay off:
- scrollToElement checks exists instead of a 0.3 s wait per swipe.
- tapUntilSelected returns as soon as its tap selects the element.
- waitForKeyboardFocus returns when the field already has focus.
- Absence checks test exists before waiting for non-existence, and the
  no-results search waits on the previous row disappearing instead of
  timing out on a row that never exists.
- The thrust schedule toggle and deleted scenario absence checks no
  longer wait out a timeout (or, for the scenario, scroll the whole
  list) to prove a negative.
- The nav-data loader replaces the welcome screen and the tab view, and
  UI tests seed current data so it never appears; the defer-button
  probes at launch and after Continue skip their 2 s and 3 s timeouts
  when the welcome screen or the payload field shows it is not up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.4.0's waits return as soon as their condition holds, instead of
taking about a second even when it already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RISCfuture
RISCfuture merged commit a077177 into main Nov 18, 2026
9 checks passed
@RISCfuture
RISCfuture deleted the ui-tests/fewer-waits branch November 18, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant