New: Release Profiles, Frontend updates (#580)

* New: Release Profiles - UI Updates

* New: Release Profiles - API Changes

* New: Release Profiles - Test Updates

* New: Release Profiles - Backend Updates

* New: Interactive Artist Search

* New: Change Montiored on Album Details Page

* New: Show Duration on Album Details Page

* Fixed: Manual Import not working if no albums are Missing

* Fixed: Sort search input by sortTitle

* Fixed: Queue columnLabel throwing JS error
This commit is contained in:
Qstick
2019-02-23 17:39:11 -05:00
committed by GitHub
parent f126eafd26
commit 3f064c94b9
409 changed files with 6882 additions and 3176 deletions
@@ -12,7 +12,7 @@ namespace NzbDrone.Core.Test.Profiles
{
[TestFixture]
public class ProfileServiceFixture : CoreTest<ProfileService>
public class ProfileServiceFixture : CoreTest<QualityProfileService>
{
[Test]
public void init_should_add_default_profiles()
@@ -20,7 +20,7 @@ namespace NzbDrone.Core.Test.Profiles
Subject.Handle(new ApplicationStartedEvent());
Mocker.GetMock<IProfileRepository>()
.Verify(v => v.Insert(It.IsAny<Profile>()), Times.Exactly(3));
.Verify(v => v.Insert(It.IsAny<QualityProfile>()), Times.Exactly(3));
}
[Test]
@@ -30,25 +30,25 @@ namespace NzbDrone.Core.Test.Profiles
{
Mocker.GetMock<IProfileRepository>()
.Setup(s => s.All())
.Returns(Builder<Profile>.CreateListOfSize(2).Build().ToList());
.Returns(Builder<QualityProfile>.CreateListOfSize(2).Build().ToList());
Subject.Handle(new ApplicationStartedEvent());
Mocker.GetMock<IProfileRepository>()
.Verify(v => v.Insert(It.IsAny<Profile>()), Times.Never());
.Verify(v => v.Insert(It.IsAny<QualityProfile>()), Times.Never());
}
[Test]
public void should_not_be_able_to_delete_profile_if_assigned_to_artist()
{
var profile = Builder<Profile>.CreateNew()
var profile = Builder<QualityProfile>.CreateNew()
.With(p => p.Id = 2)
.Build();
var artistList = Builder<Artist>.CreateListOfSize(3)
.Random(1)
.With(c => c.ProfileId = profile.Id)
.With(c => c.QualityProfileId = profile.Id)
.Build().ToList();
var importLists = Builder<ImportListDefinition>.CreateListOfSize(2)
@@ -60,7 +60,7 @@ namespace NzbDrone.Core.Test.Profiles
Mocker.GetMock<IImportListFactory>().Setup(c => c.All()).Returns(importLists);
Mocker.GetMock<IProfileRepository>().Setup(c => c.Get(profile.Id)).Returns(profile);
Assert.Throws<ProfileInUseException>(() => Subject.Delete(profile.Id));
Assert.Throws<QualityProfileInUseException>(() => Subject.Delete(profile.Id));
Mocker.GetMock<IProfileRepository>().Verify(c => c.Delete(It.IsAny<int>()), Times.Never());
@@ -69,13 +69,13 @@ namespace NzbDrone.Core.Test.Profiles
[Test]
public void should_not_be_able_to_delete_profile_if_assigned_to_import_list()
{
var profile = Builder<Profile>.CreateNew()
var profile = Builder<QualityProfile>.CreateNew()
.With(p => p.Id = 2)
.Build();
var artistList = Builder<Artist>.CreateListOfSize(3)
.All()
.With(c => c.ProfileId = 1)
.With(c => c.QualityProfileId = 1)
.Build().ToList();
var importLists = Builder<ImportListDefinition>.CreateListOfSize(2)
@@ -87,7 +87,7 @@ namespace NzbDrone.Core.Test.Profiles
Mocker.GetMock<IImportListFactory>().Setup(c => c.All()).Returns(importLists);
Mocker.GetMock<IProfileRepository>().Setup(c => c.Get(profile.Id)).Returns(profile);
Assert.Throws<ProfileInUseException>(() => Subject.Delete(profile.Id));
Assert.Throws<QualityProfileInUseException>(() => Subject.Delete(profile.Id));
Mocker.GetMock<IProfileRepository>().Verify(c => c.Delete(It.IsAny<int>()), Times.Never());
@@ -98,7 +98,7 @@ namespace NzbDrone.Core.Test.Profiles
{
var artistList = Builder<Artist>.CreateListOfSize(3)
.All()
.With(c => c.ProfileId = 2)
.With(c => c.QualityProfileId = 2)
.Build().ToList();
var importLists = Builder<ImportListDefinition>.CreateListOfSize(2)