Repository navigation
test(android): Let the keyboard settle between runtime tests - #26266
Merged
MartinZikmund merged 1 commit intoNov 11, 2026
Merged
MartinZikmund merged 1 commit into
MartinZikmund merged 1 commit into
Conversation
Keyboard show and hide requests complete asynchronously and out of order, sometimes seconds later, so a test inherited a keyboard still moving from the previous one. Its occlusion change re-ran the focused element's bring-into-view mid-test, which kept failing the Given_TextBox touch scroll-lock tests on the Android+NativeAOT lane, where the keyboard actually shows. After a test that changed the occlusion, the runner hides the keyboard and waits for it to stay hidden for 500ms (5s cap). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
This pull request is merged. |
Contributor
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 245218 found UI Test snapshots differences: Details
|
Xiaoy312
approved these changes
Nov 11, 2026
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.
GitHub Issue: closes #25644
PR Type:
🏗️ Build or CI related changes
What changed? 🚀
Given_TextBox.When_Touch_Selection_Does_Not_Lock_ScrollViewer_Android(and its_iOS/Tap_Emptyvariants) fail on the Android+NativeAOT lane in every recent master build. That lane's API 34 emulator actually shows the keyboard (the API 36 lanes don't, see #26118), and the failure is test-state leakage, not the TextBox:InputPane.Visiblecan readfalsewhile one is still in flight.InputPanethen re-runsEnsureFocusedElementInView, and the TextBox is brought back 20px (ExtraPixelsForBringIntoView) into the viewport the test just scrolled away from.The runner's per-test cleanup (
UnitTestsControl.GeneralCleanupAsync) now, on Android only and only after a test that changed the occlusion, hides the keyboard and waits until it is hidden and the occlusion has not changed for 500ms (5s cap, logged as a warning).Validation (regular Android SamplesApp built locally, API 34 Play Store emulator with CI flags):
Given_TextBoxtests that precede the target in shard 3 + the target: CI's master APK fails all 3 attempts; with this change it passes on the first attempt (2 of 2 runs). A first version that only waited forInputPane.Visible == falsestill failed the first attempt.FocusEvent), so that is the local build/emulator, not this change. CI is the full-shard validation.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code