Merge pull request #9356 from mabashian/fix-test-warnings

Fix a few unit test console warnings

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-02-18 15:14:44 +00:00 committed by GitHub
commit 080c430b82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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');
});