Skip to content

test(automation): Cover SelectorItemAutomationPeer selection - #26230

Merged
MartinZikmund merged 2 commits into
masterfrom
dev/doti/peers-sel-24628
Nov 10, 2026
Merged

MartinZikmund merged 2 commits into
masterfrom
dev/doti/peers-sel-24628

Conversation

@morning4coffe-dev

Copy link
Copy Markdown
Member

GitHub Issue: closes #24628

PR Type:

🐞 Bugfix

What changed? 🚀

The bug from #24628 is already fixed on master. #23935 replaced the is ISelector checks in SelectorItemAutomationPeer with is Selector, which matches WinUI's SelectorItemAutomationPeer_Partial.cpp (WinUI's Selector is the only ISelector implementer). Nothing covered it though, so this PR only adds regression tests to make sure it stays fixed:

  • When_Item_Peer_Select_Then_Selector_Selects_Item for ListView, GridView, ListBox and ComboBox: Select() on an item peer selects the item and IsSelected follows.
  • When_Item_Peer_AddToSelection_And_RemoveFromSelection_Then_Multiple_Selection_Changes: add and remove on a multi-selection ListView.

To check the tests catch the original bug, I temporarily restored the ISelector check: they all failed with "Operation cannot be performed.", the exact error from the issue. They pass on master, on Skia Desktop (5 runs) and WASM.

PR Checklist ✅

🤖 Generated with Claude Code

@morning4coffe-dev morning4coffe-dev self-assigned this Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 12s —— View job


Review summary

Verdict: ship. I found no issues, so I posted no inline comments (0 blocker, 0 major, 0 minor).

  • Scope: the PR only adds runtime tests in Given_AccessibleListView.cs. It changes no product code, no Generated/ files and no platform-specific files, and it adds no skipped or ignored tests.
  • Coverage: Select() is tested on ListView, GridView, ListBox and ComboBox. AddToSelection() and RemoveFromSelection() are tested on a multi-selection ListView. The assertions check both SelectedIndex/SelectedItems and the peer's IsSelected, which is the behavior from SelectorItemAutomationPeer: Select/IsSelected always fail because no type implements ISelector #24628.
  • Red/green evidence: the PR description says the tests failed with "Operation cannot be performed." when the old is ISelector check was put back, and passed on master on Skia Desktop and WASM. I did not re-run them, so I'm relying on that description.
  • Style: the tests use tabs, braces and [RunsOnUIThread]. They clean up WindowContent in finally, and they link the issue with [GitHubWorkItem].
  • Commit and PR conventions: the test(automation): ... title follows Conventional Commits. The PR body references the issue, as AGENTS.md requires.

I only read the diff and did not build or run anything.
· Branch: dev/doti/peers-sel-24628

@unodevops

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 11s —— View job


Review summary

Verdict: ship. I posted no inline comments (0 blocker, 0 major, 0 minor).

  • Scope: The PR only adds runtime tests to Given_AccessibleListView.cs. It changes no product code, no Generated/ files and no platform-specific files, and it adds no skipped or ignored tests.
  • Coverage: Select() is tested on ListView, GridView, ListBox and ComboBox. AddToSelection() and RemoveFromSelection() are tested on a multi-selection ListView. The assertions check both the selector state and the peer's IsSelected.
  • ComboBox handling: The test opens the drop-down and waits for a container before it calls the peer. It closes the drop-down and clears WindowContent in finally.
  • Red/green evidence: The PR description says the tests failed with "Operation cannot be performed." when the old is ISelector check was put back, and passed on master on Skia Desktop and WASM. I did not re-run them, so I'm relying on that description.
  • Conventions: The tests use tabs, Allman braces and [RunsOnUIThread], and they link the issue with [GitHubWorkItem]. The test(automation): ... title follows Conventional Commits.

I only read the diff. I did not build or run anything.
· Branch: dev/doti/peers-sel-24628

@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 244692 found UI Test snapshots differences: skia-linux-screenshots: 204, skia-windows-screenshots: 271

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedVisualsTestbedPage.png-dark
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Buttons.png-dark
    • Buttons.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest.png
    • BasicAcrylicBrushTest2.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • CornerRadiusControls.png-dark
  • skia-windows-screenshots: 271 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Basics.png-dark
    • Basics.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedVisualsTestbedPage.png-dark
    • AutomationProperties_StructureAndProps.png-dark
    • AutomationProperties_StructureAndProps.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • BasicAcrylicBrushTest2.png-dark
    • BasicAcrylicBrushTest2.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • AnimatedBackVisualSourceSamplePage.png
    • AutomationProperties_AutomationId.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 10s —— View job


Review summary

Verdict: ship. No inline comments (0 blocker, 0 major, 0 minor).

  • Scope: Only runtime tests are added to Given_AccessibleListView.cs. There is no product code, Generated/ or platform-suffixed file change, and no skipped or ignored tests.
  • Coverage: Select() is tested on ListView, GridView, ListBox and ComboBox. AddToSelection() and RemoveFromSelection() are tested on a multi-selection ListView. Assertions check both the selector state and the peer's IsSelected.
  • ComboBox: The test opens the drop-down and waits for a container before calling the peer. It closes the drop-down and clears WindowContent in finally.
  • Red/green evidence: I relied on the PR description, which says the tests failed with "Operation cannot be performed." when the old is ISelector check was restored, and passed on master on Skia Desktop and WASM. I did not re-run them.
  • Conventions: The tests use tabs, Allman braces, [RunsOnUIThread] and [GitHubWorkItem]. The test(automation): ... title follows Conventional Commits.
  • Screenshot diffs: The UI test snapshot differences reported by CI (204 on Linux, 271 on Windows) cover many unrelated samples. This PR touches no sample or product code, so they most likely come from the baseline or the CI environment, not from this change. Please confirm that when you validate the Screenshots Compare Test Run.

I only read the diff. I did not build or run anything.
· Branch: dev/doti/peers-sel-24628

@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 244945 found UI Test snapshots differences: skia-linux-screenshots: 248, skia-windows-screenshots: 303

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • AutomationProperties_AutomationId.png-dark
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AppWindowTitleBar Properties.png-dark
    • Basics.png-dark
    • Basics.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • AnimatedVisualsTestbedPage.png
  • skia-windows-screenshots: 303 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png
    • AutomationProperties_StructureAndProps.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AutomationProperties_StructureAndProps.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • AnimatedVisualsTestbedPage.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • ContentPresenter_NativeEmbedding.png-dark

@MartinZikmund
MartinZikmund merged commit 0e9e772 into master Nov 10, 2026
45 of 47 checks passed
@MartinZikmund
MartinZikmund deleted the dev/doti/peers-sel-24628 branch November 10, 2026 08:58
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.

SelectorItemAutomationPeer: Select/IsSelected always fail because no type implements ISelector

4 participants