Fixed Automation Tests for Firefox and Sonarr v3 UI.

pull/3268/head
Taloth Saldono 5 years ago
parent 09953e2af8
commit ef6a648189

@ -45,7 +45,7 @@ namespace NzbDrone.Automation.Test
var page = new PageBase(driver);
page.WaitForNoSpinner();
driver.ExecuteScript("window.NzbDrone.NameViews = true;");
driver.ExecuteScript("window.Sonarr.NameViews = true;");
GetPageErrors().Should().BeEmpty();
}

@ -21,7 +21,8 @@ namespace NzbDrone.Automation.Test
{
page.SeriesNavIcon.Click();
page.WaitForNoSpinner();
page.FindByClass("iv-series-index-seriesindexlayout").Should().NotBeNull();
page.Find(By.CssSelector("div[class*='SeriesIndex']")).Should().NotBeNull();
}
[Test]
@ -30,7 +31,7 @@ namespace NzbDrone.Automation.Test
page.CalendarNavIcon.Click();
page.WaitForNoSpinner();
page.FindByClass("iv-calendar-calendarlayout").Should().NotBeNull();
page.Find(By.CssSelector("div[class*='CalendarPage']")).Should().NotBeNull();
}
[Test]
@ -39,7 +40,9 @@ namespace NzbDrone.Automation.Test
page.ActivityNavIcon.Click();
page.WaitForNoSpinner();
page.FindByClass("iv-activity-activitylayout").Should().NotBeNull();
page.Find(By.LinkText("Queue")).Should().NotBeNull();
page.Find(By.LinkText("History")).Should().NotBeNull();
page.Find(By.LinkText("Blacklist")).Should().NotBeNull();
}
[Test]
@ -48,7 +51,8 @@ namespace NzbDrone.Automation.Test
page.WantedNavIcon.Click();
page.WaitForNoSpinner();
page.FindByClass("iv-wanted-missing-missinglayout").Should().NotBeNull();
page.Find(By.LinkText("Missing")).Should().NotBeNull();
page.Find(By.LinkText("Cutoff Unmet")).Should().NotBeNull();
}
[Test]
@ -57,7 +61,7 @@ namespace NzbDrone.Automation.Test
page.SystemNavIcon.Click();
page.WaitForNoSpinner();
page.FindByClass("iv-system-systemlayout").Should().NotBeNull();
page.Find(By.CssSelector("div[class*='Health']")).Should().NotBeNull();
}
[Test]
@ -66,11 +70,11 @@ namespace NzbDrone.Automation.Test
page.SeriesNavIcon.Click();
page.WaitForNoSpinner();
page.Find(By.LinkText("Add Series")).Click();
page.Find(By.LinkText("Add New")).Click();
page.WaitForNoSpinner();
page.FindByClass("iv-addseries-addserieslayout").Should().NotBeNull();
page.Find(By.CssSelector("input[class*='AddNewSeries/searchInput']")).Should().NotBeNull();
}
}
}

@ -47,16 +47,16 @@ namespace NzbDrone.Automation.Test.PageModel
});
}
public IWebElement SeriesNavIcon => FindByClass("x-series-nav");
public IWebElement SeriesNavIcon => Find(By.LinkText("Series"));
public IWebElement CalendarNavIcon => FindByClass("x-calendar-nav");
public IWebElement CalendarNavIcon => Find(By.LinkText("Calendar"));
public IWebElement ActivityNavIcon => FindByClass("x-activity-nav");
public IWebElement ActivityNavIcon => Find(By.LinkText("Activity"));
public IWebElement WantedNavIcon => FindByClass("x-wanted-nav");
public IWebElement WantedNavIcon => Find(By.LinkText("Wanted"));
public IWebElement SettingNavIcon => FindByClass("x-settings-nav");
public IWebElement SettingNavIcon => Find(By.LinkText("Settings"));
public IWebElement SystemNavIcon => FindByClass("x-system-nav");
public IWebElement SystemNavIcon => Find(By.PartialLinkText("System"));
}
}

@ -4,7 +4,8 @@
<Platforms>x86</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Selenium.Support" Version="3.2.0" />
<PackageReference Include="Selenium.Firefox.WebDriver" Version="0.24.0" />
<PackageReference Include="Selenium.Support" Version="3.141.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Test.Common\Sonarr.Test.Common.csproj" />

Loading…
Cancel
Save