diff --git a/awx/ui_next/src/components/Lookup/Lookup.test.jsx b/awx/ui_next/src/components/Lookup/Lookup.test.jsx index 7fb1ed464c..bcb4d9fdc1 100644 --- a/awx/ui_next/src/components/Lookup/Lookup.test.jsx +++ b/awx/ui_next/src/components/Lookup/Lookup.test.jsx @@ -159,4 +159,30 @@ describe('', () => { const list = wrapper.find('TestList'); expect(list.prop('canDelete')).toEqual(false); }); + + test('should be disabled while isLoading is true', async () => { + const mockSelected = [{ name: 'foo', id: 1, url: '/api/v2/item/1' }]; + wrapper = mountWithContexts( + ( + + )} + /> + ); + checkRootElementNotPresent('body div[role="dialog"]'); + const button = wrapper.find('button[aria-label="Search"]'); + expect(button.prop('disabled')).toEqual(true); + }); });