Skip to content

test(android): Let the keyboard settle between runtime tests - #26266

Merged
MartinZikmund merged 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/runtime-tests-await-keyboard-hide
Nov 11, 2026
Merged

MartinZikmund merged 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/runtime-tests-await-keyboard-hide

Conversation

@ramezgerges

@ramezgerges ramezgerges commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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_Empty variants) 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:

  • Keyboard show/hide requests complete asynchronously and out of order: a hide asked for when a test's TextBox lost focus can report hidden 3s later, and a stale show can land in the next test. InputPane.Visible can read false while one is still in flight.
  • The next test starts 5-100ms after the previous one, so the occlusion changes in the middle of it. InputPane then re-runs EnsureFocusedElementInView, 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):

  • The 14 Given_TextBox tests 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 for InputPane.Visible == false still failed the first attempt.
  • Full shard 3: CI's master APK completes (2286 tests, 0 failures). A local build of this branch, and a local build of the same tree without this change, both get killed by an ANR partway (same ~4s-per-test slowdown in unrelated layout tests, same unanswered FocusEvent), so that is the local build/emulator, not this change. CI is the full-shard validation.

PR Checklist ✅

🤖 Generated with Claude Code

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]>
@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Nov 9, 2026
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@ramezgerges

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 245218 found UI Test snapshots differences: skia-linux-screenshots: 245, skia-windows-screenshots: 301

Details
  • skia-linux-screenshots: 245 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • AnimatedVisualsTestbedPage.png-dark
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
  • skia-windows-screenshots: 301 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png-dark
    • Basics.png-dark
    • Basics.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • AnimatedBackVisualSourceSamplePage.png
    • AutomationProperties_AutomationId.png-dark
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • Buttons.png-dark
    • Buttons.png
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest.png
    • AnimatedVisualsTestbedPage.png-dark
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png

@MartinZikmund
MartinZikmund merged commit da93e1c into unoplatform:master Nov 11, 2026
54 checks passed
@ramezgerges
ramezgerges deleted the dev/rara/runtime-tests-await-keyboard-hide branch November 11, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: Given_TextBox touch scroll-lock tests time out waiting for the input pane

5 participants