From 3e1c56c892c67bcdbf6787ef67fe4b9302e12719 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Sun, 3 Nov 2024 19:59:24 -0500 Subject: [PATCH] fix(tests): When_Ctrl_Delete_Undo_Redo on macOS/skia --- .../Tests/Windows_UI_Xaml_Controls/Given_TextBox.skia.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_TextBox.skia.cs b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_TextBox.skia.cs index a6b9d4059e46..1c84daaedc1f 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_TextBox.skia.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_TextBox.skia.cs @@ -3498,7 +3498,9 @@ public async Task When_Ctrl_Delete_Undo_Redo() SUT.Focus(FocusState.Programmatic); await WindowHelper.WaitForIdle(); - SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, VirtualKey.Delete, VirtualKeyModifiers.Control)); + // on macOS it's option (menu/alt) and backspace to delete a word + var mod = OperatingSystem.IsMacOS() ? VirtualKeyModifiers.Menu : VirtualKeyModifiers.Control; + SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, VirtualKey.Delete, mod)); await WindowHelper.WaitForIdle(); SUT.Undo();