test: upgrading user-event to v14 (#2277)

This commit is contained in:
jacobo-dominguez-wgu
2025-07-17 10:26:16 -06:00
committed by GitHub
parent a51ff99042
commit 2db6d89fca
73 changed files with 1007 additions and 777 deletions

View File

@@ -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();
});