mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
WinAppDriver tests fix (#2006)
* updated wait methods and launch * canvas zone resize tests updated * updated editor opening
This commit is contained in:
@@ -15,10 +15,9 @@ namespace PowerToysTests
|
||||
public void SettingsOpen()
|
||||
{
|
||||
OpenSettings();
|
||||
ShortWait();
|
||||
|
||||
//check settings window opened
|
||||
WindowsElement settingsWindow = session.FindElementByName("PowerToys Settings");
|
||||
WindowsElement settingsWindow = WaitElementByName("PowerToys Settings");
|
||||
Assert.IsNotNull(settingsWindow);
|
||||
|
||||
isSettingsOpened = true;
|
||||
@@ -36,14 +35,12 @@ namespace PowerToysTests
|
||||
Assert.IsNotNull(pt);
|
||||
|
||||
new Actions(session).MoveToElement(pt).ContextClick().Perform();
|
||||
ShortWait();
|
||||
|
||||
|
||||
//open settings
|
||||
session.FindElementByXPath("//MenuItem[@Name=\"Settings\"]").Click();
|
||||
ShortWait();
|
||||
|
||||
WaitElementByXPath("//MenuItem[@Name=\"Settings\"]").Click();
|
||||
|
||||
//check settings window opened
|
||||
WindowsElement settingsWindow = session.FindElementByName("PowerToys Settings");
|
||||
WindowsElement settingsWindow = WaitElementByName("PowerToys Settings");
|
||||
Assert.IsNotNull(settingsWindow);
|
||||
|
||||
isSettingsOpened = true;
|
||||
@@ -62,12 +59,10 @@ namespace PowerToysTests
|
||||
Assert.IsNotNull(powerToys);
|
||||
|
||||
new Actions(session).MoveToElement(powerToys).ContextClick().Perform();
|
||||
ShortWait();
|
||||
|
||||
|
||||
//exit
|
||||
session.FindElementByXPath("//MenuItem[@Name=\"Exit\"]").Click();
|
||||
ShortWait();
|
||||
|
||||
WaitElementByXPath("//MenuItem[@Name=\"Exit\"]").Click();
|
||||
|
||||
//check PowerToys exited
|
||||
powerToys = null;
|
||||
try
|
||||
@@ -82,8 +77,6 @@ namespace PowerToysTests
|
||||
}
|
||||
|
||||
LaunchPowerToys();
|
||||
ShortWait();
|
||||
|
||||
Assert.IsNull(powerToys);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user