mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-23 22:17:15 -04:00
Tests for Wanted pages
This commit is contained in:
parent
2e3beddcbc
commit
ff3dd3ae42
5 changed files with 141 additions and 1 deletions
|
@ -55,6 +55,16 @@ namespace NzbDrone.Automation.Test
|
|||
_page.Find(By.LinkText("Blocklist")).Should().NotBeNull();
|
||||
}
|
||||
|
||||
[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();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void system_page()
|
||||
{
|
||||
|
|
|
@ -57,6 +57,8 @@ namespace NzbDrone.Automation.Test.PageModel
|
|||
|
||||
public IWebElement ActivityNavIcon => Find(By.LinkText("Activity"));
|
||||
|
||||
public IWebElement WantedNavIcon => Find(By.LinkText("Wanted"));
|
||||
|
||||
public IWebElement SettingNavIcon => Find(By.LinkText("Settings"));
|
||||
|
||||
public IWebElement SystemNavIcon => Find(By.PartialLinkText("System"));
|
||||
|
|
|
@ -266,7 +266,7 @@
|
|||
"CustomFormatsSpecificationRegularExpressionHelpText": "Custom Format RegEx is Case Insensitive",
|
||||
"Cutoff": "Cutoff",
|
||||
"CutoffNotMet": "Cutoff Not Met",
|
||||
"CutoffUnmet": "Cut-off Unmet",
|
||||
"CutoffUnmet": "Cutoff Unmet",
|
||||
"CutoffUnmetLoadError": "Error loading cutoff unmet items",
|
||||
"CutoffUnmetNoItems": "No cutoff unmet items",
|
||||
"Dash": "Dash",
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Qualities;
|
||||
|
||||
namespace NzbDrone.Integration.Test.ApiTests.WantedTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class CutoffUnmetFixture : IntegrationTest
|
||||
{
|
||||
[Test]
|
||||
[Order(1)]
|
||||
public void cutoff_should_have_monitored_items()
|
||||
{
|
||||
EnsureQualityProfileCutoff(1, Quality.HDTV720p, true);
|
||||
var movie = EnsureMovie(680, "Pulp Fiction", true);
|
||||
EnsureMovieFile(movie, Quality.SDTV);
|
||||
|
||||
var result = WantedCutoffUnmet.GetPaged(0, 15, "movieMetadata.year", "desc");
|
||||
|
||||
result.Records.Should().NotBeEmpty();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Order(1)]
|
||||
public void cutoff_should_not_have_unmonitored_items()
|
||||
{
|
||||
EnsureQualityProfileCutoff(1, Quality.HDTV720p, true);
|
||||
var movie = EnsureMovie(680, "Pulp Fiction", false);
|
||||
EnsureMovieFile(movie, Quality.SDTV);
|
||||
|
||||
var result = WantedCutoffUnmet.GetPaged(0, 15, "movieMetadata.year", "desc");
|
||||
|
||||
result.Records.Should().BeEmpty();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Order(1)]
|
||||
public void cutoff_should_have_series()
|
||||
{
|
||||
EnsureQualityProfileCutoff(1, Quality.HDTV720p, true);
|
||||
var movie = EnsureMovie(680, "Pulp Fiction", true);
|
||||
EnsureMovieFile(movie, Quality.SDTV);
|
||||
|
||||
var result = WantedCutoffUnmet.GetPaged(0, 15, "movieMetadata.year", "desc");
|
||||
|
||||
result.Records.First().Title.Should().Be("Pulp Fiction");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Order(2)]
|
||||
public void cutoff_should_have_unmonitored_items()
|
||||
{
|
||||
EnsureQualityProfileCutoff(1, Quality.HDTV720p, true);
|
||||
var movie = EnsureMovie(680, "Pulp Fiction", false);
|
||||
EnsureMovieFile(movie, Quality.SDTV);
|
||||
|
||||
var result = WantedCutoffUnmet.GetPaged(0, 15, "movieMetadata.year", "desc", "monitored", false);
|
||||
|
||||
result.Records.Should().NotBeEmpty();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace NzbDrone.Integration.Test.ApiTests.WantedTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class MissingFixture : IntegrationTest
|
||||
{
|
||||
[Test]
|
||||
[Order(0)]
|
||||
public void missing_should_be_empty()
|
||||
{
|
||||
EnsureNoMovie(680, "Pulp Fiction");
|
||||
|
||||
var result = WantedMissing.GetPaged(0, 15, "movieMetadata.year", "desc");
|
||||
|
||||
result.Records.Should().BeEmpty();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Order(1)]
|
||||
public void missing_should_have_monitored_items()
|
||||
{
|
||||
EnsureMovie(680, "Pulp Fiction", true);
|
||||
|
||||
var result = WantedMissing.GetPaged(0, 15, "movieMetadata.year", "desc");
|
||||
|
||||
result.Records.Should().NotBeEmpty();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Order(1)]
|
||||
public void missing_should_have_series()
|
||||
{
|
||||
EnsureMovie(680, "Pulp Fiction", true);
|
||||
|
||||
var result = WantedMissing.GetPaged(0, 15, "movieMetadata.year", "desc");
|
||||
|
||||
result.Records.First().Title.Should().Be("Pulp Fiction");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Order(1)]
|
||||
public void missing_should_not_have_unmonitored_items()
|
||||
{
|
||||
EnsureMovie(680, "Pulp Fiction", false);
|
||||
|
||||
var result = WantedMissing.GetPaged(0, 15, "movieMetadata.year", "desc");
|
||||
|
||||
result.Records.Should().BeEmpty();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Order(2)]
|
||||
public void missing_should_have_unmonitored_items()
|
||||
{
|
||||
EnsureMovie(680, "Pulp Fiction", false);
|
||||
|
||||
var result = WantedMissing.GetPaged(0, 15, "movieMetadata.year", "desc", "monitored", false);
|
||||
|
||||
result.Records.Should().NotBeEmpty();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue