Skip to content

Commit

Permalink
UIU-3096 - Update changelog file, add test for search functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Terala-Priyanka committed Apr 3, 2024
1 parent 1a61706 commit e444d0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

* UX consistency: Use Save & close button label stripes-component translation key. Refs UIU-3078.
* Fix two "triangle down" icons in select element of "Copy existing fee/fine owner table entries" modal. Refs UIU-2929.
* Fix incorrect translation key having count-disagreements in Pay fees/fines modal in Fees/Fines Page. Refs - UIU-1097.
* Fix incorrect translation key having count-disagreements in Pay fees/fines modal in Fees/Fines Page. Refs UIU-1097.
* Reading Room Access accordion in User record - Basic Layout. Refs UIU-3096.

## [10.1.0](https://github.com/folio-org/ui-users/tree/v10.1.0) (2024-03-20)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v10.0.4...v10.1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const ReadingRoomAccess = (props) => {
// userId,
} = props;

const filterReadingRoomsByName = (name) => {
const filterReadingRoomsByName = (e) => {
const name = e.target.value;
const filteredRRs = mockedRRAData.filter(r => r.readingRoomName.includes(name));
setFilteredRRA(filteredRRs);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { screen, render } from '@folio/jest-config-stripes/testing-library/react';
import { screen, render, fireEvent } from '@folio/jest-config-stripes/testing-library/react';

import ReadingRoomAccess from './ReadingRoomAccess';

Expand Down Expand Up @@ -42,4 +42,11 @@ describe('ReadingRoomAccess', () => {
render(<ReadingRoomAccess {...alteredProps} />);
expect(screen.getByPlaceholderText('ui-users.readingRoom.filter')).toBeDefined();
});

it('should filter MCL records "Name" column, based on the string entered in search box', () => {
render(<ReadingRoomAccess {...alteredProps} />);
const inputEl = screen.getByPlaceholderText('ui-users.readingRoom.filter');
fireEvent.change(inputEl, { target: { value: '1' } });
expect(screen.getByTestId('reading-room-access-mcl')).toBeDefined();
});
});

0 comments on commit e444d0c

Please sign in to comment.