mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 21:39:34 +02:00
Automation ;)
This commit is contained in:
41
NzbDrone.Web.UI.Test/Fluent/NavigationExtention.cs
Normal file
41
NzbDrone.Web.UI.Test/Fluent/NavigationExtention.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System.Linq;
|
||||
using OpenQA.Selenium.Remote;
|
||||
|
||||
namespace NzbDrone.Web.UI.Automation.Fluent
|
||||
{
|
||||
public static class NavigationExtention
|
||||
{
|
||||
|
||||
private const string baseUrl = "http://localhost:8989/";
|
||||
|
||||
public static RemoteWebDriver GivenHomePage(this RemoteWebDriver driver)
|
||||
{
|
||||
driver.Navigate().GoToUrl(baseUrl);
|
||||
return driver;
|
||||
}
|
||||
|
||||
public static RemoteWebDriver GivenSettingsPage(this RemoteWebDriver driver)
|
||||
{
|
||||
driver.Navigate().GoToUrl(baseUrl + "settings");
|
||||
return driver;
|
||||
}
|
||||
|
||||
public static RemoteWebDriver GivenUpcomingPage(this RemoteWebDriver driver)
|
||||
{
|
||||
driver.Navigate().GoToUrl(baseUrl + "Upcoming");
|
||||
return driver;
|
||||
}
|
||||
|
||||
public static RemoteWebDriver GivenHistoryPage(this RemoteWebDriver driver)
|
||||
{
|
||||
driver.Navigate().GoToUrl(baseUrl + "History");
|
||||
return driver;
|
||||
}
|
||||
|
||||
public static RemoteWebDriver GivenMissingPage(this RemoteWebDriver driver)
|
||||
{
|
||||
driver.Navigate().GoToUrl(baseUrl + "Missing");
|
||||
return driver;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user