* Refactor IntegrationTestApp.
Use a `ListBox` to switch pages instead of a `TabControl`: the `TabControl` didn't adapt well to smaller screen sizes, and the `MainWindow` was getting unwieldy anyway.
* Update tests to use new pager.
Move logic for selecting the page to a base class as we may need to handle scrolling manually on macOS at some point (Appium on macOS doesn't scroll elements into view automatically).
* Add AutomationPeer.IsOffscreen.
This is needed in order for controls to be scrolled into view using WinAppDriver. The default is the same as WPF and the default value is overridden in the same controls as WPF (where present).
#Conflicts:
# samples/IntegrationTestApp/App.axaml.cs
# samples/IntegrationTestApp/MainWindow.axaml
# samples/IntegrationTestApp/MainWindow.axaml.cs
# samples/IntegrationTestApp/TopmostWindowTest.axaml.cs
# src/Avalonia.Controls/TreeViewItem.cs
# tests/Avalonia.IntegrationTests.Appium/ContextMenuTests.cs
# tests/Avalonia.IntegrationTests.Appium/PointerTests.cs
# tests/Avalonia.IntegrationTests.Appium/ScreenTests.cs
# tests/Avalonia.IntegrationTests.Appium/TrayIconTests.cs
# tests/Avalonia.IntegrationTests.Appium/WindowDecorationsTests.cs
# tests/Avalonia.IntegrationTests.Appium/WindowTests.cs
# tests/Avalonia.IntegrationTests.Appium/WindowTests_MacOS.cs
When opening a context menu and pressing the "arrow down" key, the first menu item was not selected. This issue was introduced by #11287. The fix is to make the `ContextMenu` focusable.
Added an integration test to try to prevent regressions.
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Add integration test for access key indicators in macOS menu bar titles.
Tests for access key indicators displaying as plain underscores in macOS menu bar items.
* Exclude access key markers from native menu titles on macOS.
macOS does not support access key markers, so they just display as extra underscores.
Integration tests for #10420:
- Adds an `--overlayPopups` command-line argument to IntegrationTestApp
- Renames `TestAppFixture` -> `DefaultAppFixture`
- Adds additional `OverlayPopupsAppFixture`
- Runs ComboBox and Menu tests in both default and overlay popups mode
- VS keeps changing the `.sln` file
We need to be explicit about which element we're talking about when there are two elements with the same content, and so use accessibility IDs rather than Name.