Repository navigation
[UI Tests] Give Quick Accent scroll checks time on slow agents - #51346
Merged
Merged
Conversation
Raise the keyboard-navigation scroll waits from 5s to 15s with 2 consecutive matches; each poll runs several slow winappcli UIA searches on CI. Include Selected, widths and match count in failure details. Seen in CI build 391160.
ð§ PR intakeVisual evidence: Not needed â The changed files do not indicate a visible UI change. No visual evidence is expected. Recommendation
â Ready for reviewThis PR passed the automated intake checks and is ready for maintainer review. Automated PR intake; PowerToys maintainers make final decisions. |
Yu Leng (moooyo)
approved these changes
Oct 16, 2026
Boliang Zhang (LegendaryBlair)
pushed a commit
that referenced
this pull request
Oct 19, 2026
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Stabilizes the Quick Accent `ScrollbarSpacingAppearsOnlyForOverflowingCharacterLists` UI test, which timed out in [CI build 391160](https://microsoft.visualstudio.com/Dart/_build/results?buildId=391160) (Test x64Win10 Release) on a PR that only changed csproj settings, so the flakiness was already there. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments The failure message was: ``` Keyboard navigation did not scroll the selected character into view. Viewport X=100, width=1720; selected last item X=1779, width=34; first item X=108 -> 0. ``` That last observed state already satisfies the geometry check (the last item spans 1779..1813, inside the 100..1820 viewport, and the first item has scrolled away). So the wait ran out of time; the UI was not wrong. In `AssertKeyboardNavigationScrollsIntoView`, every poll runs three winappcli UIA lookups (the viewport `Find` plus two `FindCharacterItem` calls). On CI agents each lookup can take seconds (other logs show `winappcli slow call 4864ms`), so 5 s with 3 consecutive matches leaves room for only one or two polls. Changes, all in `PowerAccentTestHelper.cs`: - The scroll-forward wait and the return-navigation wait now share a `ScrollIntoViewTimeoutMs` of 15 s instead of 5 s, and need 2 consecutive matches instead of 3. Because the predicate still requires a selected item that is fully inside the viewport, 2 matches is enough to confirm the layout is stable. - Failure details now report `Selected` for the checked item, the width of the first item, and how many consecutive matches were reached. With that, the next failure will show whether selection lagged, whether the off-screen item reported an empty rect (X=0 means a virtualized or empty-rect peer, which still passes the `< initialFirstX - 1` check), or whether the wait simply timed out. No product code changed. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - `tools\build\build.ps1 -Platform x64 -Configuration Release '/restore'` from `src\modules\poweraccent\PowerAccent.UITests`: **passed**, exit 0, 0 warnings, 0 errors (warnings are treated as errors). - I did not run the UI test locally. It needs an interactive desktop and installed PowerToys bits, so CI will exercise it. (cherry picked from commit 8ecd599) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary of the Pull Request
Stabilizes the Quick Accent
ScrollbarSpacingAppearsOnlyForOverflowingCharacterListsUI test, which timed out in CI build 391160 (Test x64Win10 Release) on a PR that only changed csproj settings, so the flakiness was already there.PR Checklist
Detailed Description of the Pull Request / Additional comments
The failure message was:
That last observed state already satisfies the geometry check (the last item spans 1779..1813, inside the 100..1820 viewport, and the first item has scrolled away). So the wait ran out of time; the UI was not wrong. In
AssertKeyboardNavigationScrollsIntoView, every poll runs three winappcli UIA lookups (the viewportFindplus twoFindCharacterItemcalls). On CI agents each lookup can take seconds (other logs showwinappcli slow call 4864ms), so 5 s with 3 consecutive matches leaves room for only one or two polls.Changes, all in
PowerAccentTestHelper.cs:ScrollIntoViewTimeoutMsof 15 s instead of 5 s, and need 2 consecutive matches instead of 3. Because the predicate still requires a selected item that is fully inside the viewport, 2 matches is enough to confirm the layout is stable.Selectedfor the checked item, the width of the first item, and how many consecutive matches were reached. With that, the next failure will show whether selection lagged, whether the off-screen item reported an empty rect (X=0 means a virtualized or empty-rect peer, which still passes the< initialFirstX - 1check), or whether the wait simply timed out.No product code changed.
Validation Steps Performed
tools\build\build.ps1 -Platform x64 -Configuration Release '/restore'fromsrc\modules\poweraccent\PowerAccent.UITests: passed, exit 0, 0 warnings, 0 errors (warnings are treated as errors).