Release Testing Day 2 (#1937)

* Removed unneded ngModel on password field

* Fixed some bad validation messages on Edit Reading List modal and disabled save button

* Added a lot of trace code to help debug a foreign constraint issue.

* Fixed a bug where after a series is scanned, generate covers for series didn't respect webp cover generation.

* Fixed library last scan being stored in Utc, but expected to be server time.

* Fixed up some of that trace logging being way too verbose. Fixed a case where when a missing storyarc number, the whole pair was dropped. Now, it will default that item to the end of the reading list.

Fixed a bug where Start and End dates weren't being calculated after generating a reading list.

* Fixed a bug where the default admin user for reading list creation from files was selecting the wrong user.

Changed so that when there is a bad pair (aka number missing) and only 1 pair, then we wont constantly reorder the item.

* Fixed unit test
This commit is contained in:
Joe Milazzo 2023-04-22 13:04:09 -05:00 committed by GitHub
parent 66f84a0ee3
commit c70154f428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 163 additions and 51 deletions

View file

@ -1203,10 +1203,67 @@ public class ReadingListServiceTests
#region CreateReadingListsFromSeries
private async Task<Tuple<Series, Series>> SetupData()
{
// Setup 2 series, only do this once tho
if (await _unitOfWork.SeriesRepository.DoesSeriesNameExistInLibrary("Series 1", 1, MangaFormat.Archive))
{
return new Tuple<Series, Series>(await _unitOfWork.SeriesRepository.GetFullSeriesForSeriesIdAsync(1),
await _unitOfWork.SeriesRepository.GetFullSeriesForSeriesIdAsync(2));
}
var library =
await _unitOfWork.LibraryRepository.GetLibraryForIdAsync(1,
LibraryIncludes.Series | LibraryIncludes.AppUser);
var user = new AppUserBuilder("majora2007", "majora2007@fake.com").Build();
library!.AppUsers.Add(user);
library.ManageReadingLists = true;
// Setup the series for CreateReadingListsFromSeries
var series1 = new SeriesBuilder("Series 1")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder("1")
.WithChapter(new ChapterBuilder("1")
.WithStoryArc("CreateReadingListsFromSeries")
.WithStoryArcNumber("1")
.Build())
.WithChapter(new ChapterBuilder("2").Build())
.Build())
.Build();
var series2 = new SeriesBuilder("Series 2")
.WithFormat(MangaFormat.Archive)
.WithVolume(new VolumeBuilder(API.Services.Tasks.Scanner.Parser.Parser.DefaultVolume)
.WithChapter(new ChapterBuilder("1").Build())
.WithChapter(new ChapterBuilder("2").Build())
.Build())
.Build();
library!.Series.Add(series1);
library!.Series.Add(series2);
await _unitOfWork.CommitAsync();
return new Tuple<Series, Series>(series1, series2);
}
// [Fact]
// public async Task CreateReadingListsFromSeries_ShouldCreateFromSinglePair()
// {
// //await SetupData();
//
// var series1 = new SeriesBuilder("Series 1")
// .WithFormat(MangaFormat.Archive)
// .WithVolume(new VolumeBuilder("1")
// .WithChapter(new ChapterBuilder("1")
// .WithStoryArc("CreateReadingListsFromSeries")
// .WithStoryArcNumber("1")
// .Build())
// .WithChapter(new ChapterBuilder("2").Build())
// .Build())
// .Build();
//
// _readingListService.CreateReadingListsFromSeries(series.Item1)
// }
#endregion