Repository navigation
Skip the one-second floor on present-element waits in UI tests - #88
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
no-results search waits on the previous row disappearing instead of
timing out on a row that never exists.
longer wait out a timeout (or, for the scenario, scroll the whole
list) to prove a negative.
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
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