WinAppDriver tests fix (#2006)

* updated wait methods and launch
* canvas zone resize tests updated
* updated editor opening
This commit is contained in:
Seraphima Zykova
2020-04-10 18:52:16 +03:00
committed by GitHub
parent f589dd2f26
commit 14441ec144
9 changed files with 176 additions and 208 deletions

View File

@@ -18,7 +18,7 @@ namespace PowerToysTests
{
WindowsElement cancelButton = session.FindElementByXPath("//Window[@Name=\"FancyZones Editor\"]/Window/Button[@Name=\"Cancel\"]");
new Actions(session).MoveToElement(cancelButton).Click().Perform();
ShortWait();
WaitSeconds(1);
Assert.AreEqual(_defaultZoneSettings, File.ReadAllText(_zoneSettingsPath), "Settings were changed");
}
@@ -26,7 +26,7 @@ namespace PowerToysTests
private void SaveTest()
{
new Actions(session).MoveToElement(session.FindElementByName("Save and apply")).Click().Perform();
ShortWait();
WaitSeconds(1);
JObject settings = JObject.Parse(File.ReadAllText(_zoneSettingsPath));
Assert.AreEqual("Custom Layout 1", settings["custom-zone-sets"][0]["name"]);
@@ -188,7 +188,6 @@ namespace PowerToysTests
if (editorWindow != null)
{
editorWindow.SendKeys(OpenQA.Selenium.Keys.Alt + OpenQA.Selenium.Keys.F4);
ShortWait();
}
}
catch(OpenQA.Selenium.WebDriverException)