mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Adds book deletion and restore to the web client.
Soft deletes books so the scan keeps their paths reserved, lists the deleted books on a themed page, and lets the user restore them. Updates the API, bundled themes, localization, documentation and tests. Closes #213
This commit is contained in:
1 parent
ef5ede6325
commit
f26b07d4ff
125 files changed
+9856
-378
No files matched your search
+21
@@ -66,6 +66,27 @@ public class GetThemeTemplateEndpointTests : IClassFixture<AuthenticatedLuminaAp
|
||||
Assert.False(string.IsNullOrWhiteSpace(result.Template));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("lumina-default")]
|
||||
[InlineData("editorial-paper")]
|
||||
public async Task GetThemeTemplate_WhenCalledForTheDeletedItemsPage_ShouldReturnTheBundledTemplate(string themeId)
|
||||
{
|
||||
// Arrange
|
||||
await ThemeTestHelpers.WaitForBundledThemeAsync(_apiFactory);
|
||||
HttpClient anonymousClient = _apiFactory.CreateClient();
|
||||
|
||||
// Act
|
||||
HttpResponseMessage response = await anonymousClient.GetAsync($"/api/v1/themes/{themeId}/templates/library/written-content-library/book-library/books/deleted-items");
|
||||
|
||||
// Assert
|
||||
response.EnsureSuccessStatusCode();
|
||||
ThemeTemplateResponse? result = await response.Content.ReadFromJsonAsync<ThemeTemplateResponse>(_jsonOptions);
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal(themeId, result!.Theme.ThemeId);
|
||||
Assert.Contains("btn-back-to-library", result.Template);
|
||||
Assert.Contains("restoreUrlTemplate", result.Template);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetThemeTemplate_WhenThemeDoesNotExist_ShouldReturnNotFound()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user