|
|
|
@ -459,17 +459,13 @@ namespace Avalonia.IntegrationTests.Appium |
|
|
|
// WindowStartupLocation needs to be calculated before the window is shown, meaning that
|
|
|
|
// the position of a centered window can be off by a bit. From initial testing, looks
|
|
|
|
// like this shouldn't be more than 10 pixels.
|
|
|
|
if (Math.Abs(expected.X - actual.X) > 10) |
|
|
|
throw EqualException.ForMismatchedValues(expected, actual); |
|
|
|
if (Math.Abs(expected.Y - actual.Y) > 10) |
|
|
|
throw EqualException.ForMismatchedValues(expected, actual); |
|
|
|
Assert.Equal(expected.X, actual.X, 10.0); |
|
|
|
Assert.Equal(expected.Y, actual.Y, 10.0); |
|
|
|
} |
|
|
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) |
|
|
|
{ |
|
|
|
if (Math.Abs(expected.X - actual.X) > 15) |
|
|
|
throw EqualException.ForMismatchedValues(expected, actual); |
|
|
|
if (Math.Abs(expected.Y - actual.Y) > 15) |
|
|
|
throw EqualException.ForMismatchedValues(expected, actual); |
|
|
|
Assert.Equal(expected.X, actual.X, 15.0); |
|
|
|
Assert.Equal(expected.Y, actual.Y, 15.0); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|