Browse Source

Speed up tests a little.

pull/9221/head
Steven Kirk 4 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 finally
{ {
try if (state == Controls.WindowState.FullScreen)
{ {
_session.FindElementByAccessibilityId("WindowState").SendClick(); try
_session.FindElementByName("Normal").SendClick(); {
_session.FindElementByAccessibilityId("WindowState").SendClick();
// Wait for animations to run. _session.FindElementByName("Normal").SendClick();
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Thread.Sleep(1000);
} 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