Skip to content

Commit

Permalink
Remove dependency on location API in system test
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0thyj committed Jan 23, 2025
1 parent cbfaeb9 commit d914a5b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/SystemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ public void ShouldUpdateWallpaper()
if (HandleLocationPrompt()) Thread.Sleep(TimeSpan.FromSeconds(2));
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.FindElementByAccessibilityId("radioButton3").Click();
driver.FindElementByXPath("//Button[@Name='OK']").Click();
Thread.Sleep(TimeSpan.FromSeconds(5));
driver.FindElementByXPath("//Button[@Name='Yes']").Click();
Thread.Sleep(TimeSpan.FromSeconds(2));

driver.SwitchTo().Window(driver.WindowHandles[0]);
Expand All @@ -50,7 +47,7 @@ public void ShouldUpdateWallpaper()
Thread.Sleep(TimeSpan.FromSeconds(2));

Assert.Contains(["scripts", "settings.json", "themes"],
Directory.GetFileSystemEntries(Path.GetDirectoryName(AppPath)).Select(Path.GetFileName).ToArray());
Directory.GetFileSystemEntries(Path.GetDirectoryName(AppPath)).Select(Path.GetFileName).ToArray());
Assert.StartsWith(Path.Combine(Path.GetDirectoryName(AppPath), "themes", "Windows_11", "img"), GetWallpaperPath());
}
catch (WebDriverException)
Expand Down

0 comments on commit d914a5b

Please sign in to comment.