Browse Source

Speed up tests a little.

pull/9221/head
Steven Kirk 3 years ago
parent
commit
de852142a4
  1. 22
      tests/Avalonia.IntegrationTests.Appium/WindowTests.cs

22
tests/Avalonia.IntegrationTests.Appium/WindowTests.cs

@ -85,16 +85,22 @@ namespace Avalonia.IntegrationTests.Appium
}
finally
{
try
if (state == Controls.WindowState.FullScreen)
{
_session.FindElementByAccessibilityId("WindowState").SendClick();
_session.FindElementByName("Normal").SendClick();
// Wait for animations to run.
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Thread.Sleep(1000);
try
{
_session.FindElementByAccessibilityId("WindowState").SendClick();
_session.FindElementByName("Normal").SendClick();
} catch { /* Ignore errors in cleanup */ }
// Wait for animations to run.
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Thread.Sleep(1000);
}
catch
{
/* Ignore errors in cleanup */
}
}
}
}

Loading…
Cancel
Save