diff --git a/src/components/UserDetailSections/ReadingRoomAccess/ReadingRoomAccess.test.js b/src/components/UserDetailSections/ReadingRoomAccess/ReadingRoomAccess.test.js index 97d403b0d..fb45d3229 100644 --- a/src/components/UserDetailSections/ReadingRoomAccess/ReadingRoomAccess.test.js +++ b/src/components/UserDetailSections/ReadingRoomAccess/ReadingRoomAccess.test.js @@ -112,6 +112,13 @@ describe('ReadingRoomAccess', () => { expect(document.querySelectorAll('[class^="mclCell"]')[0].innerHTML).toBe('Allowed'); }); + it('should sort records in descending order of access when access header is clicked', () => { + render(); + fireEvent.click(document.getElementById('clickable-list-column-access')); + fireEvent.click(document.getElementById('clickable-list-column-access')); + expect(document.querySelectorAll('[class^="mclCell"]')[0].innerHTML).toBe('Not allowed'); + }); + it('should sort the records by room name when name column header is clicked', () => { render(); fireEvent.click(document.getElementById('clickable-list-column-readingroomname'));