mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-22 08:43:36 -05:00
Fixes console errors thrown about React state updates being be wrapped into act(...) on the job template add form
This commit is contained in:
@@ -241,7 +241,9 @@ describe('<JobTemplateAdd />', () => {
|
||||
});
|
||||
});
|
||||
await waitForElement(wrapper, 'EmptyStateBody', el => el.length === 0);
|
||||
wrapper.find('button[aria-label="Cancel"]').invoke('onClick')();
|
||||
await act(async () => {
|
||||
wrapper.find('button[aria-label="Cancel"]').invoke('onClick')();
|
||||
});
|
||||
expect(history.location.pathname).toEqual('/templates');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user