Skip to content

Commit e4e0125

Browse files
committed
test: fist test in ProcessingNotification
1 parent 0f0c9ae commit e4e0125

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/generic/processing-notification/ProcessingNotification.test.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ describe('<ProcessingNotification />', () => {
2222
render(<ProcessingNotification {...props} close={() => {}} />);
2323
await screen.findByText(props.title);
2424
const undo = await screen.findByText('Undo');
25-
const alert = await screen.findByRole('alert', { hidden: true });
26-
expect(alert.classList.contains('processing-notification-hide-close-button')).toBeFalsy();
25+
const alert = await screen.findAllByRole('alert', { hidden: true });
26+
expect(alert[1].classList.contains('processing-notification-hide-close-button')).toBeFalsy();
2727
await userEvent.click(undo);
2828
expect(mockUndo).toHaveBeenCalled();
2929
});
3030

3131
it('add hide-close-button class if no close action is passed', async () => {
3232
render(<ProcessingNotification {...props} />);
3333
await screen.findByText(props.title);
34-
const alert = await screen.findByRole('alert', { hidden: true });
35-
expect(alert.classList.contains('processing-notification-hide-close-button')).toBeTruthy();
34+
const alert = await screen.findAllByRole('alert', { hidden: true });
35+
expect(alert[1].classList.contains('processing-notification-hide-close-button')).toBeTruthy();
3636
});
3737
});

0 commit comments

Comments
 (0)