* removed duplicated code between Window.Show and Window.ShowDialog
* Handling different cases of window initial position and size + unit test
* positioning cursor on resize grip in WindowOrder_Modal_Dialog_Stays_InFront_Of_Parent_When_Clicking_Resize_Grip test
* Fix for flaky test
* displaying decimal digits of slider value to avoid some issues with rounding
---------
Co-authored-by: Herman Kirshin <herman.kirshin@jetbrains.com>
* 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).
* Enable IncludeAvaloniaGenerators on integartion tests app
* Implement basic TitleBarAutomationPeer
* Add WindowDecorationsTests (windows only for now)
* Implement window decoration tests on macOS
* Fix build on appium 1
* Fix some windows tests
* Extract WindowDecorationsTests into a separated collection, so it won't conflict
* Fix build
* Fix build
* Don't include two windows in a11y tree.
`AvnRootAccessibilityElement` has been removed and now `AvnWindow` handles the accessibility protocol itself, exposing its children via the `AvnView`.
* Remove hack now that issue is fixed.
* Fix build errors after merge.
* Make it work on macOS
* Revert most of changes
This reverts commit 3526c6f601.
* Polyfill appium2, make it usable with both versions
* Revert unrelated changes
* Fix slider incompatibility
Under the appium-mac2-driver, `FindElementByAccessibilityId` doesn't actually find elements by their accessibility ID, it also finds them by their accessibility name. Since #10531 added an automation peer for `Label` which sets the accessibility name, the wrong control was being located (e.g. it located the "Position" label instead of the `Name="Position"` text box).
Disambiguate these controls by adding a `Current` prefix to make integration tests pass again.
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
For the following scenario:
- Open a child window of main window
- Open a modal window as a child of main window
- Close main window
- First child window should remain in front of main window
When a window exits fullscreen, its child windows need to be ordered, but we shouldn't touch the z-order of the window itself as this sometimes seemed to result in the parent window being shown over the child windows. Fixes flaky integration tests (hopefully).
- Warning CA1815 PlatformGraphicsExternalImageProperties should override Equals Avalonia.Base (net6.0) \src\Avalonia.Base\Platform\PlatformGraphicsExternalMemory.cs 7 N/A
- Warning CA1823 Unused field 'ProximityPoints' Avalonia.Controls (net6.0) src\Avalonia.Controls\Presenters\ScrollContentPresenter.cs 18 N/A
- Warning CS0169 The field 'VulkanDemoControl._vkInstance' is never used GpuInterop samples\GpuInterop\VulkanDemo\VulkanDemoControl.cs 19 N/A
- Warning CS0169 The field 'VulkanDemoControl._api' is never used GpuInterop samples\GpuInterop\VulkanDemo\VulkanDemoControl.cs 20 N/A
- Warning CS0219 The variable 'isZooming' is assigned but its value is never used ControlCatalog (netstandard2.0) samples\ControlCatalog\Pages\GesturePage.cs 73 N/A
- Warning xUnit2004 Do not use Assert.Equal() to check for boolean conditions. Avalonia.IntegrationTests.Appium tests\Avalonia.IntegrationTests.Appium\WindowTests_MacOS.cs 267 N/A
And update the tests to use the value of `NSWindow.orderedIndex` exposed in 0cc0443d34 instead of relying on appium to give us a z-ordered list of windows.
Seems to cause less flaky tests; `mainWindow.Click()` clicks the main window in the middle, where the secondary window is shown, so don't go out of our way to put the secondary window in front of where we're clicking.