Skip to content

Fix flaky autocomplete billing address flowController UI tests 🪿✨ - #6861

Open
joyceqin-stripe wants to merge 3 commits into
masterfrom
joyceqin/autocomplete-billing-address-tests
Open

Fix flaky autocomplete billing address flowController UI tests 🪿✨#6861
joyceqin-stripe wants to merge 3 commits into
masterfrom
joyceqin/autocomplete-billing-address-tests

Conversation

@joyceqin-stripe

@joyceqin-stripe joyceqin-stripe commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Minion run

Summary

In testCard_AutocompleteBillingAddress_flowController and testCard_AutocompleteBillingAddress_flowController_endpoint, replace continueButton.tap() with continueButton.waitForExistenceAndTap() and increase the confirmButton tap timeout from the default 4 s to 10 s.

Motivation

Both tests were intermittently failing at successText.waitForExistence(timeout: 10.0). The root cause is a race condition: continueButton.tap() fires without waiting for the button to be hittable, and the subsequent confirmButton.waitForExistenceAndTap() (default 4-second timeout) sometimes expires before the FlowController sheet finishes its dismiss animation and async work. Using waitForExistenceAndTap() on continueButton and a 10-second timeout on confirmButton gives each step enough time to complete reliably.

Testing

Ran locally 50x

Changelog

N/A

Use waitForExistenceAndTap() instead of tap() for continueButton to
ensure the button is hittable before tapping, and increase the
confirmButton timeout to 10 seconds to account for sheet dismiss
animation and async work completing.

Committed-By-Agent: goose
@joyceqin-stripe
joyceqin-stripe marked this pull request as ready for review August 6, 2026 19:18
@joyceqin-stripe
joyceqin-stripe requested review from a team as code owners August 6, 2026 19:18
@joyceqin-stripe
joyceqin-stripe enabled auto-merge (squash) August 7, 2026 14:38
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