Browse Source

Fix tests on macOS.

`MoveByOffset` caused Appium to hang, but `MoveToElement` with an offset seems to work fine.
pull/11051/head
Steven Kirk 3 years ago
parent
commit
afc55cb985
  1. 4
      tests/Avalonia.IntegrationTests.Appium/SliderTests.cs

4
tests/Avalonia.IntegrationTests.Appium/SliderTests.cs

@ -72,7 +72,7 @@ namespace Avalonia.IntegrationTests.Appium
var thumb = slider.FindElementByAccessibilityId("thumb");
var initialThumbRect = thumb.Rect;
new Actions(_session).MoveToElement(slider).MoveByOffset(100, 0).Click().Perform();
new Actions(_session).MoveToElement(slider, 100, 0, MoveToElementOffsetOrigin.Center).Click().Perform();
var value = Math.Round(double.Parse(slider.Text, CultureInfo.InvariantCulture));
var boundValue = double.Parse(
@ -93,7 +93,7 @@ namespace Avalonia.IntegrationTests.Appium
var thumb = slider.FindElementByAccessibilityId("thumb");
var initialThumbRect = thumb.Rect;
new Actions(_session).MoveToElement(slider).MoveByOffset(-100, 0).Click().Perform();
new Actions(_session).MoveToElement(slider, -100, 0, MoveToElementOffsetOrigin.Center).Click().Perform();
var value = Math.Round(double.Parse(slider.Text, CultureInfo.InvariantCulture));
var boundValue = double.Parse(

Loading…
Cancel
Save