2020-10-08 04:07:52 +00:00
|
|
|
using System.Reflection;
|
|
|
|
using FluentAssertions;
|
2013-11-12 06:18:57 +00:00
|
|
|
using NUnit.Framework;
|
2013-11-18 03:34:31 +00:00
|
|
|
using NzbDrone.Automation.Test.PageModel;
|
|
|
|
using OpenQA.Selenium;
|
2013-11-12 06:18:57 +00:00
|
|
|
|
|
|
|
namespace NzbDrone.Automation.Test
|
|
|
|
{
|
|
|
|
[TestFixture]
|
|
|
|
public class MainPagesTest : AutomationTest
|
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
private PageBase _page;
|
2013-11-18 03:34:31 +00:00
|
|
|
|
|
|
|
[SetUp]
|
|
|
|
public void Setup()
|
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
_page = new PageBase(driver);
|
2013-11-18 03:34:31 +00:00
|
|
|
}
|
|
|
|
|
2013-11-12 06:18:57 +00:00
|
|
|
[Test]
|
2019-09-03 02:22:25 +00:00
|
|
|
public void movie_page()
|
2013-11-12 06:18:57 +00:00
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.MovieNavIcon.Click();
|
|
|
|
_page.WaitForNoSpinner();
|
2020-10-08 04:07:52 +00:00
|
|
|
|
|
|
|
var imageName = MethodBase.GetCurrentMethod().Name;
|
|
|
|
TakeScreenshot(imageName);
|
|
|
|
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.Find(By.CssSelector("div[class*='MovieIndex']")).Should().NotBeNull();
|
2013-11-12 06:18:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void calendar_page()
|
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.CalendarNavIcon.Click();
|
|
|
|
_page.WaitForNoSpinner();
|
2013-11-18 03:34:31 +00:00
|
|
|
|
2020-10-08 04:07:52 +00:00
|
|
|
var imageName = MethodBase.GetCurrentMethod().Name;
|
|
|
|
TakeScreenshot(imageName);
|
|
|
|
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.Find(By.CssSelector("div[class*='CalendarPage']")).Should().NotBeNull();
|
2013-11-12 06:18:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
2014-10-12 07:29:09 +00:00
|
|
|
public void activity_page()
|
2013-11-12 06:18:57 +00:00
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.ActivityNavIcon.Click();
|
|
|
|
_page.WaitForNoSpinner();
|
2013-11-18 03:34:31 +00:00
|
|
|
|
2020-10-08 04:07:52 +00:00
|
|
|
var imageName = MethodBase.GetCurrentMethod().Name;
|
|
|
|
TakeScreenshot(imageName);
|
|
|
|
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.Find(By.LinkText("Queue")).Should().NotBeNull();
|
|
|
|
_page.Find(By.LinkText("History")).Should().NotBeNull();
|
2021-08-19 19:13:14 +00:00
|
|
|
_page.Find(By.LinkText("Blocklist")).Should().NotBeNull();
|
2013-11-12 06:18:57 +00:00
|
|
|
}
|
|
|
|
|
2024-05-14 13:33:15 +00:00
|
|
|
[Test]
|
|
|
|
public void wanted_page()
|
|
|
|
{
|
|
|
|
_page.WantedNavIcon.Click();
|
|
|
|
_page.WaitForNoSpinner();
|
|
|
|
|
|
|
|
_page.Find(By.LinkText("Missing")).Should().NotBeNull();
|
|
|
|
_page.Find(By.LinkText("Cutoff Unmet")).Should().NotBeNull();
|
|
|
|
}
|
|
|
|
|
2013-11-12 06:18:57 +00:00
|
|
|
[Test]
|
|
|
|
public void system_page()
|
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.SystemNavIcon.Click();
|
|
|
|
_page.WaitForNoSpinner();
|
2013-11-18 03:34:31 +00:00
|
|
|
|
2020-10-08 04:07:52 +00:00
|
|
|
var imageName = MethodBase.GetCurrentMethod().Name;
|
|
|
|
TakeScreenshot(imageName);
|
|
|
|
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.Find(By.CssSelector("div[class*='Health']")).Should().NotBeNull();
|
2013-11-18 03:34:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
2019-09-03 02:22:25 +00:00
|
|
|
public void add_movie_page()
|
2013-11-18 03:34:31 +00:00
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.MovieNavIcon.Click();
|
|
|
|
_page.WaitForNoSpinner();
|
|
|
|
_page.Find(By.LinkText("Add New")).Click();
|
|
|
|
_page.WaitForNoSpinner();
|
2013-11-18 03:34:31 +00:00
|
|
|
|
2020-10-08 04:07:52 +00:00
|
|
|
var imageName = MethodBase.GetCurrentMethod().Name;
|
|
|
|
TakeScreenshot(imageName);
|
|
|
|
|
2019-12-22 22:08:53 +00:00
|
|
|
_page.Find(By.CssSelector("input[class*='AddNewMovie-searchInput']")).Should().NotBeNull();
|
2013-11-12 06:18:57 +00:00
|
|
|
}
|
|
|
|
}
|
2019-12-22 21:24:10 +00:00
|
|
|
}
|