[GUI] Update window chrome controls (#700)

This commit is contained in:
Daniel Freak
2026-07-30 17:03:57 +03:00
committed by GitHub
parent 5f1bd5a77c
commit 753ddf93be
6 changed files with 93 additions and 22 deletions
@@ -0,0 +1,27 @@
// Copyright (C) 2026 SharpEmu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
using Avalonia.Controls;
using SharpEmu.GUI;
using Xunit;
namespace SharpEmu.Libs.Tests.GUI;
public sealed class WindowChromeTests
{
[Theory]
[InlineData(WindowState.Normal, "crop_square", "Maximize", "Maximize window")]
[InlineData(WindowState.Maximized, "filter_none", "Restore", "Restore window")]
public void GetMaximizeButtonState_ReturnsConsistentVisualAndAccessibleState(
WindowState windowState,
string expectedGlyph,
string expectedToolTip,
string expectedAutomationName)
{
var state = MainWindow.GetMaximizeButtonState(windowState);
Assert.Equal(expectedGlyph, state.Glyph);
Assert.Equal(expectedToolTip, state.ToolTip);
Assert.Equal(expectedAutomationName, state.AutomationName);
}
}