1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03: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:
mabashian 2020-07-28 12:08:40 -04:00
parent 1faaba4e6c
commit 8b2c98ffde

View File

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