diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroups.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroups.test.jsx index 9ee649b1f2..fff99cddaf 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroups.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroups.test.jsx @@ -2,9 +2,27 @@ import React from 'react'; import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; +import { HostsAPI } from '@api'; import InventoryHostGroups from './InventoryHostGroups'; jest.mock('@api'); +HostsAPI.readAllGroups.mockResolvedValue({ + data: { + count: 1, + results: [ + { + id: 1, + url: 'www.google.com', + summary_fields: { + inventory: { id: 1, name: 'foo' }, + user_capabilities: { edit: true }, + }, + name: 'Bar', + }, + ], + }, +}); +HostsAPI.readGroupsOptions.mockResolvedValue({ data: { actions: {} } }); describe('', () => { test('initially renders successfully', async () => {