Fix a few unit test console warnings

This commit is contained in:
mabashian 2021-02-18 09:14:15 -05:00
parent 2a37430eab
commit afe36974de
2 changed files with 7 additions and 5 deletions

View File

@ -311,7 +311,7 @@ describe('<MultiCredentialsLookup />', () => {
});
wrapper.update();
const typeSelect = wrapper.find('AnsibleSelect');
act(() => {
await act(async () => {
typeSelect.invoke('onChange')({}, 500);
});
wrapper.update();

View File

@ -140,10 +140,12 @@ describe('<Sort />', () => {
act(() => wrapper.find('Dropdown').invoke('onToggle')(true));
wrapper.update();
await waitForElement(wrapper, 'Dropdown', el => el.prop('isOpen') === true);
wrapper
.find('li')
.at(0)
.prop('onClick')({ target: { innerText: 'Bar' } });
act(() =>
wrapper
.find('li')
.at(0)
.prop('onClick')({ target: { innerText: 'Bar' } })
);
wrapper.update();
expect(onSort).toBeCalledWith('bar', 'ascending');
});