fix(books): make "select all" actually select all not just the books loaded in (#533)

This commit is contained in:
brios
2026-04-22 17:27:38 -04:00
committed by Zach Yale
parent 1f5f99d958
commit 13f282fe72
8 changed files with 98 additions and 14 deletions
@@ -76,4 +76,13 @@ describe('BookSelectionService', () => {
expect(service.selectedBooks()).toEqual(new Set());
expect(service.selectedCount()).toBe(0);
});
it('selects all from provided book IDs when passed to selectAll', () => {
const books = [makeBook(1), makeBook(2)];
service.setCurrentBooks(books);
service.selectAll([10, 20, 30, 40, 50]);
expect(service.selectedBooks()).toEqual(new Set([10, 20, 30, 40, 50]));
expect(service.selectedCount()).toBe(5);
});
});