mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 07:56:06 -03:30
Fixes failing test
This commit is contained in:
@@ -2,9 +2,27 @@ import React from 'react';
|
|||||||
import { mountWithContexts } from '@testUtils/enzymeHelpers';
|
import { mountWithContexts } from '@testUtils/enzymeHelpers';
|
||||||
import { act } from 'react-dom/test-utils';
|
import { act } from 'react-dom/test-utils';
|
||||||
import { createMemoryHistory } from 'history';
|
import { createMemoryHistory } from 'history';
|
||||||
|
import { HostsAPI } from '@api';
|
||||||
import InventoryHostGroups from './InventoryHostGroups';
|
import InventoryHostGroups from './InventoryHostGroups';
|
||||||
|
|
||||||
jest.mock('@api');
|
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('<InventoryHostGroups />', () => {
|
describe('<InventoryHostGroups />', () => {
|
||||||
test('initially renders successfully', async () => {
|
test('initially renders successfully', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user