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 1c84daaedc1f..cd91f54a07b4 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 @@ -268,7 +268,11 @@ public async Task When_Ctrl_End_ScrollViewer_Vertical_Offset() Assert.AreEqual(0, ((ScrollViewer)SUT.ContentElement).VerticalOffset); - SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, VirtualKey.End, VirtualKeyModifiers.Control)); + // on macOS moving to the end of the document is done with `Command` + `Down` + var macOS = OperatingSystem.IsMacOS(); + var key = macOS ? VirtualKey.Down : VirtualKey.End; + var mod = macOS ? VirtualKeyModifiers.Windows : VirtualKeyModifiers.Control; + SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, key, mod)); await WindowHelper.WaitForIdle(); ((ScrollViewer)SUT.ContentElement).VerticalOffset.Should().BeApproximately(((ScrollViewer)SUT.ContentElement).ScrollableHeight, 1.0);