Skip to content

Commit

Permalink
Increase delays in system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0thyj committed Jan 2, 2025
1 parent cc52b8e commit 50b64ed
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/SystemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,24 @@ public void ShouldUpdateWallpaper()
{
driver.FindElementByXPath("//Window[@Name='Select Language']").Click();
driver.FindElementByXPath("//Button[@Name='OK']").Click();
Thread.Sleep(TimeSpan.FromSeconds(5));
Thread.Sleep(TimeSpan.FromSeconds(10));

driver.SwitchTo().Window(driver.WindowHandles[0]);
driver.FindElementByXPath("//Window[@Name='Configure Schedule']").Click();
driver.FindElementByAccessibilityId("radioButton1").Click();
driver.FindElementByAccessibilityId("locationBox").SendKeys("New York NY");
driver.FindElementByXPath("//Button[@Name='OK']").Click();
Thread.Sleep(TimeSpan.FromSeconds(2));
Thread.Sleep(TimeSpan.FromSeconds(5));
driver.SwitchTo().Window(driver.WindowHandles.Last());
driver.FindElementByXPath("//Button[@Name='Yes']").Click();
Thread.Sleep(TimeSpan.FromSeconds(5));
Thread.Sleep(TimeSpan.FromSeconds(10));

driver.SwitchTo().Window(driver.WindowHandles[0]);
driver.FindElementByXPath("//Window[@Name='Select Theme']").Click();
driver.FindElementByAccessibilityId("listView1").SendKeys(Keys.Control + Keys.End);
driver.FindElementByXPath("//ListItem[@Name='Windows 11']").Click();
driver.FindElementByXPath("//Button[@Name='Apply']").Click();
Thread.Sleep(TimeSpan.FromSeconds(5));

Assert.Contains(["scripts", "settings.json", "themes"],
Directory.GetFileSystemEntries(Path.GetDirectoryName(AppPath)).Select(Path.GetFileName).ToArray());
Expand Down

0 comments on commit 50b64ed

Please sign in to comment.