test: upgrading user-event to v14 (#2277)
This commit is contained in:
committed by
GitHub
parent
a51ff99042
commit
2db6d89fca
@@ -19,12 +19,13 @@ describe('<ProcessingNotification />', () => {
|
||||
});
|
||||
|
||||
it('renders successfully', async () => {
|
||||
const user = userEvent.setup();
|
||||
render(<ProcessingNotification {...props} close={() => {}} />);
|
||||
await screen.findByText(props.title);
|
||||
const undo = await screen.findByText('Undo');
|
||||
const alert = await screen.findByRole('alert', { hidden: true });
|
||||
expect(alert.classList.contains('processing-notification-hide-close-button')).toBeFalsy();
|
||||
await userEvent.click(undo);
|
||||
await user.click(undo);
|
||||
expect(mockUndo).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user