Skip to content

Commit

Permalink
fix(tests): When_Ctrl_Home_End on macOS/skia
Browse files Browse the repository at this point in the history
  • Loading branch information
spouliot committed Nov 4, 2024
1 parent 6acb0cd commit ff2386c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,15 @@ public async Task When_Ctrl_Home_End()
SUT.Focus(FocusState.Programmatic);
await WindowHelper.WaitForIdle();

SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, VirtualKey.End, VirtualKeyModifiers.Control));
var key = OperatingSystem.IsMacOS() ? VirtualKey.Down : VirtualKey.End;
SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, key, _platformCtrlKey));
await WindowHelper.WaitForIdle();

Assert.AreEqual(SUT.Text.Length, SUT.SelectionStart);
Assert.AreEqual(0, SUT.SelectionLength);

SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, VirtualKey.Home, VirtualKeyModifiers.Control));
key = OperatingSystem.IsMacOS() ? VirtualKey.Up : VirtualKey.Home;
SUT.SafeRaiseEvent(UIElement.KeyDownEvent, new KeyRoutedEventArgs(SUT, key, _platformCtrlKey));
await WindowHelper.WaitForIdle();

Assert.AreEqual(0, SUT.SelectionStart);
Expand Down

0 comments on commit ff2386c

Please sign in to comment.