From e81b57337c3a053303ae3c2e496737740067d0a9 Mon Sep 17 00:00:00 2001 From: Priyanka Terala Date: Wed, 15 May 2024 11:58:04 +0530 Subject: [PATCH] UIU-3112 - add unit test --- .../ReadingRoomAccess/ReadingRoomAccess.test.js | 7 +++++++ 1 file changed, 7 insertions(+) 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'));