diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroups.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroups.test.jsx index d5a3665247..935ef7bb04 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroups.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroups.test.jsx @@ -1,10 +1,11 @@ import React from 'react'; -import { Route } from 'react-router-dom'; import { mountWithContexts } from '@testUtils/enzymeHelpers'; import { act } from 'react-dom/test-utils'; import { createMemoryHistory } from 'history'; import InventoryGroups from './InventoryGroups'; +jest.mock('@api'); + describe('', () => { test('initially renders successfully', async () => { let wrapper; @@ -15,12 +16,8 @@ describe('', () => { await act(async () => { wrapper = mountWithContexts( - ( - {}} inventory={inventory} /> - )} - />, + {}} inventory={inventory} />, + { context: { router: { history, route: { location: history.location } }, @@ -39,12 +36,7 @@ describe('', () => { let wrapper; await act(async () => { wrapper = mountWithContexts( - ( - {}} inventory={inventory} /> - )} - />, + {}} inventory={inventory} />, { context: { router: { history, route: { location: history.location } },