Skip to content

Commit

Permalink
UIU-3112 - add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Terala-Priyanka committed May 15, 2024
1 parent e1e9eaa commit e81b573
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(<ReadingRoomAccess {...alteredProps} />);
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(<ReadingRoomAccess {...alteredProps} />);
fireEvent.click(document.getElementById('clickable-list-column-readingroomname'));
Expand Down

0 comments on commit e81b573

Please sign in to comment.