Repository navigation
Conversation
Wait for the identity provider button to exist, be enabled, and be hittable before tapping. Wait for the provider chooser to disappear before proceeding to sign-in. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
josephpab
requested review from
Ameya Patil (ameyapat) and
Yong Zeng (jasoncoolmax)
October 23, 2026 17:17
| @@ -81,8 +81,15 @@ - (void)runSharedB2CLoginStartWithTestRequest:(MSIDAutomationTestRequest *)reque | |||
| - (void)b2cSelectProvider:(NSString *)identityProvider | |||
There was a problem hiding this comment.
This pull request does not update CHANGELOG.md.
Please consider if this change would be noticeable to a partner or user and either update CHANGELOG.md or resolve this conversation.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No blocking issues were identified in this localized test-only change, though reported compilation blockers prevented runtime verification of flake reduction.
No open issues 🎉
What changed in this PR
Addresses a render-readiness race in B2C UI tests by synchronizing provider selection with the button’s interaction readiness and subsequent disappearance. The change is limited to test code.
Changes:
- Waits until the provider button exists, is enabled, and is hittable before tapping.
- Waits for the button to disappear before continuing, using 60-second timeouts for both waits.
| File | Description |
|---|---|
| MSAL/test/automation/tests/interactive/MSALB2CInteractiveTests.m | Adds readiness and disappearance waits to b2cSelectProvider:. |
Review effort: Balanced
This branch has not been deployed
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.
Proposed changes
Fix the render timing race affecting
testInteractiveB2CLogin_withEmbeddedWebView_withoutLoginHint_withSigninPolicy_withGUIDTenantId_withMSAAccountand the other B2C scenarios usingb2cSelectProvider:.The provider button can exist in the accessibility tree before it is ready for interaction. Replace the existence-only wait with an XCTest predicate requiring the button to exist, be enabled, and be hittable before tapping. Then wait for the provider button to disappear before proceeding to the sign-in form (whose email field is already awaited by the existing helper).
Both waits use the existing 60-second UI-test timeout convention. No fixed sleeps, retries, shared helper changes, or production-code changes.
Type of change
Risk
Additional information
git diff --checkpassed. Attempted the exact affected test using theMSAL Test Automation (iOS)scheme on an iPhone 15 Pro / iOS 17.5 simulator with Xcode 26.6. Test execution was blocked during compilation:NSString+MSALAccountIdenfiers.m:103fails with-Werror,-Wgnu-folding-constant.MSALRedirectUri.m:70: no known class methodredirectUriIsBrokerCapable:.The UI test has not run, so the flake reduction is not yet empirically verified. The checkout's pre-existing IdentityCore pointer, project settings, app settings, and Info.plist changes are excluded from this PR.