From adf8c8fe152eaa9d57680016a9062df837b215a9 Mon Sep 17 00:00:00 2001 From: Emmanuel Hansen Date: Fri, 8 Dec 2023 03:21:57 +0000 Subject: [PATCH] Add integration tests for checking window sizes on launch when client is extended. (#13871) * win32 - fix client size update when window is opened with extended client area * add tests for extended client window show size --- tests/Avalonia.IntegrationTests.Appium/WindowTests.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Avalonia.IntegrationTests.Appium/WindowTests.cs b/tests/Avalonia.IntegrationTests.Appium/WindowTests.cs index 831bce064a..eece0d4c17 100644 --- a/tests/Avalonia.IntegrationTests.Appium/WindowTests.cs +++ b/tests/Avalonia.IntegrationTests.Appium/WindowTests.cs @@ -205,6 +205,17 @@ namespace Avalonia.IntegrationTests.Appium } } + [Fact] + public void Extended_Client_Window_Shows_With_Requested_Size() + { + var clientSize = new Size(400, 400); + using var window = OpenWindow(clientSize, ShowWindowMode.NonOwned, WindowStartupLocation.CenterScreen, extendClientArea: true); + var windowState = _session.FindElementByAccessibilityId("CurrentWindowState"); + var current = GetWindowInfo(); + + Assert.Equal(current.ClientSize, clientSize); + } + [Fact] public void TransparentWindow() {