Skip to content

Commit

Permalink
Update RequestsRoute.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
VSnehalatha authored Jul 7, 2023
1 parent 05e5116 commit 932b353
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/routes/RequestsRoute.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jest.mock('../components', () => ({
PrintContent: jest.fn(() => <div>PrintContent</div>)
}));

jest.mock('../components/RequestsFilters/RequestsFilters', () => ({onClear}) => {
jest.mock('../components/RequestsFilters/RequestsFilters', () => ({ onClear }) => {
return (
<div>
<span>RequestsFilter</span>
<button type="button" onClick={onClear} >onClear</button>
<button type="button" onClick={onClear}>onClear</button>
</div>
);
});
Expand Down Expand Up @@ -122,7 +122,7 @@ SearchAndSort.mockImplementation(jest.fn(({
const onClickActions = () => {
onDuplicate(records[0]);
buildRecordsForHoldsShelfReport();
massageNewRecord({});
massageNewRecord({});
resultIsSelected({ item: { id: 'id' } });
viewRecordOnCollapse();
};
Expand Down Expand Up @@ -344,7 +344,7 @@ describe('RequestsRoute', () => {
afterEach(() => {
jest.clearAllMocks();
});

it('should execute "SearchAndSort" with "createTitleLevelRequest" equal true', () => {
const expectedResult = {
newRecordInitialValues: {
Expand All @@ -369,7 +369,7 @@ describe('RequestsRoute', () => {
expect(screen.getByText('RequestsFilter')).toBeInTheDocument();
});
it('onChange to be called on onClear of RequestsFilter', () => {
userEvent.click(screen.getByRole('button', { name: 'onClear' }))
userEvent.click(screen.getByRole('button', { name: 'onClear' }));
expect(RequestFilterData.onChange).toBeCalled();
});
it('PrintContent should render', () => {
Expand Down

0 comments on commit 932b353

Please sign in to comment.