fix(books): make "select all" actually select all not just the books loaded in (#533)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user