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 72301e41d848..a6b9d4059e46 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 @@ -360,14 +360,16 @@ public async Task When_Ctrl_Delete() 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(); Assert.AreEqual("ipsum dolor", SUT.Text); Assert.AreEqual(0, SUT.SelectionStart); Assert.AreEqual(0, SUT.SelectionLength); - SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, VirtualKey.Delete, VirtualKeyModifiers.Control)); + SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, VirtualKey.Delete, mod)); await WindowHelper.WaitForIdle(); Assert.AreEqual("dolor", SUT.Text);