mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 14:09:28 -02:30
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);
|
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');
|
expect(history.location.pathname).toEqual('/templates');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user