Skip to content

fix(ios): UITest tapAndType waits for keyboard focus (#288)#300

Merged
auerbachb merged 4 commits into
mainfrom
cursor/ios-uitest-keyboard-focus-4943
May 1, 2026
Merged

fix(ios): UITest tapAndType waits for keyboard focus (#288)#300
auerbachb merged 4 commits into
mainfrom
cursor/ios-uitest-keyboard-focus-4943

Conversation

@auerbachb
Copy link
Copy Markdown
Owner

@auerbachb auerbachb commented Apr 30, 2026

User description

Test plan

  • ios-e2e-smoke CI lane passes (smoke auth + basic navigation)
  • ios-e2e-critical CI lane passes (VoiceOver timer, password reset flow)
  • tapAndType waits for keyboard focus before typing — no "neither element nor any descendant has keyboard focus" failures
  • App relaunch via terminateAppReliably is stable under repeat runs
  • XCTWaiter() instance init compiles on Xcode 26

Summary

UITest keyboard/focus helper and CI hardening for PR #288 / #300.

Recent fixes

  • Compile: XCTWaiter() default init on Xcode 26.
  • Smoke: terminateAppReliably for flaky terminate().
  • Critical VoiceOver: Long virtual session + slow multiplier so navigation cannot finish before timer assertion.
  • Critical password reset: Dismiss keyboard after typing email, tapByStableCenter on forgot-password, 20s wait for confirmation.

Closes #288

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Tests

    • Improved iOS test stability: more reliable keyboard interactions for auth flows, more robust app relaunch handling, and extended timing for VoiceOver/timer checks to reduce CI flakiness.
  • Chores

    • Added documentation for iOS E2E retry behavior configuration.
    • Consolidated repeated test interaction patterns for cleaner, more consistent UI tests.

CodeAnt-AI Description

Make iOS UI tests wait for focus and handle flaky CI runs

What Changed

  • Text fields now wait until they have keyboard focus before typing, which prevents auth screen test failures during fast or hardware-keyboard simulator runs
  • Password reset and login flows now dismiss the keyboard, tap the forgot-password button more reliably, and wait longer for the confirmation message
  • App relaunch checks now retry termination until the app fully closes, reducing launch-related test flakes
  • The VoiceOver timer test now uses a longer session window so slow CI runs cannot finish the session before the accessibility checks run
  • The iOS CI workflow now documents that each e2e lane runs with a single retry attempt

Impact

✅ Fewer auth test failures
✅ More stable iOS CI runs
✅ Clearer password reset verification

🔄 Retrigger CodeAnt AI Review

Details

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Add XCUIElement.tapAndType(in:) that taps, waits for app.keyboard and
hasKeyboardFocus before typeText to fix CI flake on auth screens.

Use it in password-reset and login/history tests plus keyboard overlap test.

Document iOS E2E lane retry count (MAX_RETRIES=1 via package.json) in e2e-ios workflow.

Closes #288

Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 30, 2026

CodeAnt AI is reviewing your PR.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
still-point Ignored Ignored Preview May 1, 2026 0:22am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

📝 Walkthrough

Walkthrough

Adds an XCUIElement extension tapAndType that ensures keyboard focus before typing, updates auth UI tests to use it and a reliable app termination helper, and adds inline documentation to the iOS E2E workflow about retry configuration.

Changes

Cohort / File(s) Summary
CI Workflow Documentation
.github/workflows/e2e-ios.yml
Added inline documentation explaining how UITest retry behavior is driven by scripts/e2e/run-ios-tests.sh and package.json MAX_RETRIES values.
UITest Helper
ios/StillPointAppUITests/Helpers/XCUIElement+TapAndType.swift
New XCUIElement.tapAndType(_:in:timeout:file:line:) extension: taps element, waits for hasKeyboardFocus == true via XCTWaiter/predicate, optionally waits for keyboard appearance, reports a single XCTFail on timeout, then calls typeText.
Test Updates
ios/StillPointAppUITests/StillPointAppUITests.swift
Replaced ad-hoc tap()+typeText() sequences with tapAndType for auth fields; added terminateAppReliably(_:,attempts:) helper to retry app termination until .notRunning; adjusted waits/timing for a VoiceOver/timer test and for password-reset assertion.

Sequence Diagram(s)

sequenceDiagram
  participant Test as XCTest
  participant App as XCUIApplication
  participant Keyboard as Simulator Keyboard

  rect rgba(200,230,255,0.5)
  Test->>App: tap(element)
  App->>Keyboard: request first responder / present keyboard
  Keyboard-->>App: keyboard appears
  App-->>Test: element.hasKeyboardFocus == true
  Test->>App: typeText(text)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • codeant-ai

Poem

🐰 I tapped the field, then paused to hear the keys,
Patient whiskers waiting for the soft OS breeze.
When focus settled, letters hopped in line,
No flaky frantic failures this time. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a tapAndType helper that waits for keyboard focus before typing, which directly addresses the primary objective of fixing keyboard-focus flakes in iOS UITests.
Linked Issues check ✅ Passed The PR fully implements the acceptance criteria from #288: a tapAndType helper exists that waits for keyboard first-responder, both key tests (testLaunchLoginCompleteSessionAndHistoryPersistence and testPasswordResetEntryIsDiscoverable) use the safer typing flow, and workflow documentation was added to explain retry behavior.
Out of Scope Changes check ✅ Passed All changes are directly scoped to addressing the keyboard-focus flake issue: the tapAndType helper, test updates (email/password handling, keyboard dismissal, reliable app termination), VoiceOver timing adjustments, and workflow documentation—none constitute out-of-scope refactoring or unrelated modifications.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #288

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/ios-uitest-keyboard-focus-4943

Comment @coderabbitai help to get the list of available commands and usage tips.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Apr 30, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ios/StillPointAppUITests/Helpers/XCUIElement`+TapAndType.swift:
- Around line 18-23: Replace the non-fatal XCTAssertTrue check for keyboard
presence with a guard that returns early: call
keyboard.waitForExistence(timeout: timeout) in a guard statement, and on failure
call XCTFail with the same message ("Keyboard did not appear after tapping text
field", include file and line) then return to prevent continuing to
focus/typing; update the helper in XCUIElement+TapAndType.swift (the method that
performs the tap/focus and typing) to use guard + XCTFail + return instead of
XCTAssertTrue so the helper behavior is deterministic even when
continueAfterFailure = true.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c563e19e-1b15-4c06-a84c-144cd1aa6bde

📥 Commits

Reviewing files that changed from the base of the PR and between b40073d and 7b3b51a.

📒 Files selected for processing (3)
  • .github/workflows/e2e-ios.yml
  • ios/StillPointAppUITests/Helpers/XCUIElement+TapAndType.swift
  • ios/StillPointAppUITests/StillPointAppUITests.swift

Comment thread ios/StillPointAppUITests/Helpers/XCUIElement+TapAndType.swift Outdated
Comment thread ios/StillPointAppUITests/Helpers/XCUIElement+TapAndType.swift Outdated
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 30, 2026

CodeAnt AI finished reviewing your PR.

@auerbachb
Copy link
Copy Markdown
Owner Author

@CodeAnt-AI review

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 30, 2026

CodeAnt AI is running the review.

@auerbachb
Copy link
Copy Markdown
Owner Author

@cursor review

@auerbachb
Copy link
Copy Markdown
Owner Author

@graphite-app re-review

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels Apr 30, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 30, 2026

Sequence Diagram

This PR adds a UITest helper that taps an auth text field, waits for the software keyboard and keyboard focus, then types text to eliminate flaky keyboard-focus failures in iOS end-to-end tests.

sequenceDiagram
    participant UITest
    participant TextField
    participant App
    participant Keyboard

    UITest->>TextField: tapAndType(text, in app)
    TextField->>TextField: Tap field
    TextField->>App: Wait for keyboard existence
    App-->>Keyboard: Show keyboard
    Keyboard-->>TextField: Keyboard visible
    TextField->>TextField: Wait for keyboard focus then type text
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Apr 30, 2026

CodeAnt AI finished running the review.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7b3b51a. Configure here.

Comment thread ios/StillPointAppUITests/Helpers/XCUIElement+TapAndType.swift
cursoragent and others added 3 commits April 30, 2026 23:32
…te, VoiceOver session

- tapAndType: wait for hasKeyboardFocus first (software keyboard optional for
  hardware-keyboard sims); use XCTWaiter instance for clear timeout failures;
  optional short keyboard wait + focus retry
- testLaunchLoginCompleteSessionAndHistoryPersistence: terminateAppReliably
  with polling for .notRunning to absorb flaky terminate on CI
- testVoiceOverLabelsForTimerAndPrimaryButton: 600s virtual session at 0.05x
  so slow CI cannot complete before timer label assertion

Addresses PR #300 iOS e2e smoke/critical failures and review feedback.

Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
XCTWaiter(delegate:delegateQueue:) is unavailable / mismatched on Xcode 26;
plain XCTWaiter() avoids SwiftCompile failure on ios-e2e-smoke.

Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
…r wait

Critical lane failed: confirmation never appeared after forgot-password tap.
Dismiss keyboard after email entry, use tapByStableCenter on forgot button,
extend passwordResetMessage wait to 20s.

Co-authored-by: Bretton Auerbach <auerbachb@users.noreply.github.com>
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

CodeAnt AI is running Incremental review

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels May 1, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

CodeAnt AI Incremental review completed.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

CodeAnt AI is running the review.

@auerbachb auerbachb merged commit 37e5997 into main May 1, 2026
14 checks passed
@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels May 1, 2026
@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label May 1, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

Sequence Diagram

This PR updates iOS UI tests to use a tap-and-type helper that waits for keyboard focus before typing into auth fields and adds a terminate helper that reliably stops the app before relaunch, reducing flaky CI failures.

sequenceDiagram
    participant UITest
    participant Field
    participant App
    participant Waiter

    UITest->>Field: tapAndType(text, in app)
    Field->>Field: Tap element
    Field->>Waiter: Wait for keyboard focus on field
    alt Focus becomes active
        Waiter-->>Field: Focus ready
    else Focus delayed
        Field->>App: Optionally wait for keyboard and retry focus
        Waiter-->>Field: Focus ready or timeout
    end
    alt Focus acquired
        Field->>Field: Type text into field
    else Focus not acquired
        Field-->>UITest: Fail test with focus timeout
    end

    UITest->>App: terminateAppReliably()
    loop Up to N attempts
        App->>App: Call terminate
        App->>App: Poll until state is notRunning
    end
    alt App stopped
        App-->>UITest: Ready for relaunch
    else Still running
        App-->>UITest: Fail test app did not stop
    end
Loading

Generated by CodeAnt AI

Comment on lines +28 to +31
let keyboard = app.keyboards.firstMatch
if keyboard.waitForExistence(timeout: min(2.0, timeout)) {
let retryFocus = XCTNSPredicateExpectation(predicate: focusPredicate, object: self)
outcome = waiter.wait(for: [retryFocus], timeout: min(3.0, timeout))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The retry path is incorrectly gated on software keyboard existence. In hardware-keyboard CI runs, app.keyboards.firstMatch may never exist, so the code skips the second focus check entirely and can still fail with focus-related typing errors even when focus would be obtained shortly after. Retry the focus predicate independently of keyboard existence (or always perform a short delayed re-check). [logic error]

Severity Level: Major ⚠️
- ⚠️ Login UI tests may flake on hardware-keyboard CI configs.
- ⚠️ Password reset discovery test reliability reduced by focus gating.
Steps of Reproduction ✅
1. Run the iOS UI test suite that includes
`testLaunchLoginCompleteSessionAndHistoryPersistence()` and
`testKeyboardOverlapKeepsSubmitReachable()` in
`ios/StillPointAppUITests/StillPointAppUITests.swift:27-47` and `143-162`, where
`emailField.tapAndType(..., in: app)` and `passwordField.tapAndType(..., in: app)` are
invoked using the default timeout.

2. These calls enter `XCUIElement.tapAndType(_:in:timeout:file:line:)` in
`ios/StillPointAppUITests/Helpers/XCUIElement+TapAndType.swift:9-45`, which taps the field
(`line 16`), then waits for `hasKeyboardFocus == true` using `XCTWaiter` and
`XCTNSPredicateExpectation` (`lines 18-23`), storing the result in `outcome`.

3. In a CI configuration using a hardware keyboard where no software keyboard view appears
(matching the helper's documented support for "hardware keyboard / CI variants" at lines
6-7), if `hasKeyboardFocus` does not become true within the initial `timeout`, `outcome`
becomes `.timedOut`, the code enters the retry block (`line 25`), but the retry is
conditioned on `keyboard.waitForExistence(...)` (`lines 28-29`) which returns false when
`app.keyboards.firstMatch` never materializes, so the focus retry at `lines 30-31` is
skipped and `outcome` remains `.timedOut`.

4. Control then hits the `guard outcome == .completed` at `lines 35-42`, which triggers
`XCTFail("Field did not become keyboard first responder...")` and returns early instead of
performing a short delayed re-check of the focus predicate; any case where focus would be
obtained shortly after the initial timeout but with no software keyboard present will
cause `tapAndType` to fail these login/password-reset UI tests prematurely, even though an
unconditional retry would have allowed the tests to proceed.

Fix in Cursor | Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** ios/StillPointAppUITests/Helpers/XCUIElement+TapAndType.swift
**Line:** 28:31
**Comment:**
	*Logic Error: The retry path is incorrectly gated on software keyboard existence. In hardware-keyboard CI runs, `app.keyboards.firstMatch` may never exist, so the code skips the second focus check entirely and can still fail with focus-related typing errors even when focus would be obtained shortly after. Retry the focus predicate independently of keyboard existence (or always perform a short delayed re-check).

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

CodeAnt AI finished running the review.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

CodeAnt AI is running the review.

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels May 1, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

Sequence Diagram

This PR updates iOS UI tests to use a focus-first tapAndType helper for auth fields and a terminateAppReliably helper before relaunch, reducing keyboard focus flakes and unstable terminate failures in CI.

sequenceDiagram
    participant UITest
    participant App
    participant Keyboard

    UITest->>App: Launch app for auth flow
    UITest->>App: tapAndType email field
    App-->>UITest: Email field gains keyboard focus
    UITest->>App: tapAndType password field
    UITest->>App: Submit auth form
    UITest->>App: terminateAppReliably before relaunch
    App-->>UITest: App reaches notRunning state
    UITest->>App: Relaunch and verify home or session screen
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

A review was recently triggered for this PR. Please wait 9s before retriggering.

1 similar comment
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

A review was recently triggered for this PR. Please wait 9s before retriggering.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

A review was recently triggered for this PR. Please wait 3s before retriggering.

1 similar comment
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

A review was recently triggered for this PR. Please wait 3s before retriggering.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

CodeAnt AI finished running the review.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 4, 2026

CodeAnt AI is running the review.

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels May 4, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 4, 2026

Sequence Diagram

This PR adds a keyboard focus helper that taps an auth field, waits for it to gain keyboard focus, then types, and also introduces a reliable terminate helper that retries app termination until the app is fully stopped before relaunch.

sequenceDiagram
    participant UITest
    participant App
    participant KeyboardFocusHelper

    UITest->>App: Launch app for auth flow
    UITest->>KeyboardFocusHelper: tapAndType on auth field
    KeyboardFocusHelper->>App: Tap field and wait for keyboard focus
    App-->>KeyboardFocusHelper: Field has keyboard focus
    KeyboardFocusHelper-->>UITest: Text entered into field

    UITest->>App: terminateAppReliably
    App->>App: Retry terminate and poll for notRunning
    App-->>UITest: App fully stopped, ready for relaunch
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 4, 2026

CodeAnt AI finished running the review.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 4, 2026

CodeAnt AI is running the review.

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels May 4, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 4, 2026

Sequence Diagram

This PR adds a tapAndType helper that waits for keyboard focus before typing into auth fields and a terminateAppReliably helper that ensures the app fully stops before relaunch, reducing flaky iOS UI tests.

sequenceDiagram
    participant UITest
    participant AuthField
    participant App

    UITest->>AuthField: tapAndType with text and app
    AuthField->>AuthField: tap and wait for keyboard focus
    AuthField-->>UITest: field ready for typing
    AuthField->>AuthField: type text into field

    UITest->>App: terminateAppReliably
    App->>App: terminate and poll until notRunning
    App-->>UITest: app fully terminated
    UITest->>App: launch for next step
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 4, 2026

CodeAnt AI finished running the review.

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 8, 2026

CodeAnt AI is running the review.

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels May 8, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 8, 2026

Sequence Diagram

This PR updates iOS UI tests to use a tapAndType helper that waits for keyboard focus before typing into auth fields and adds a terminateAppReliably helper to stabilize app termination and relaunch flows in CI.

sequenceDiagram
    participant UITest
    participant App
    participant AuthField

    UITest->>App: Launch auth flow
    UITest->>AuthField: tapAndType credentials
    AuthField->>App: Tap field and wait for keyboard focus
    App-->>AuthField: Field has keyboard focus
    AuthField-->>UITest: Type text into field completes

    UITest->>App: Request reliable termination
    App->>App: Retry terminate until state notRunning
    App-->>UITest: App terminated and ready for relaunch
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 8, 2026

CodeAnt AI finished running the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS UITests: keyboard-focus flake on auth fields (smoke + critical lanes)

2 participants