mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 02:17:37 -02:30
Fix ORganizationTeams test
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
import { shallow } from 'enzyme';
|
||||||
|
import { Router } from 'react-router-dom';
|
||||||
import { createMemoryHistory } from 'history';
|
import { createMemoryHistory } from 'history';
|
||||||
import { mountWithContexts } from '../../../../enzymeHelpers';
|
import { mountWithContexts } from '../../../../enzymeHelpers';
|
||||||
import { sleep } from '../../../../testUtils';
|
import { sleep } from '../../../../testUtils';
|
||||||
@@ -92,12 +93,18 @@ describe('<OrganizationTeams />', () => {
|
|||||||
initialEntries: ['/organizations/1/teams'],
|
initialEntries: ['/organizations/1/teams'],
|
||||||
});
|
});
|
||||||
const wrapper = mountWithContexts(
|
const wrapper = mountWithContexts(
|
||||||
<OrganizationTeams
|
<Router history={history}>
|
||||||
id={1}
|
<OrganizationTeams
|
||||||
searchString=""
|
id={1}
|
||||||
/>, { context: {
|
searchString=""
|
||||||
network: { api: { readOrganizationTeamsList }, handleHttpError: () => {} },
|
/>
|
||||||
router: { history }
|
</Router>,
|
||||||
|
{ context: {
|
||||||
|
network: {
|
||||||
|
api: { readOrganizationTeamsList },
|
||||||
|
handleHttpError: () => {}
|
||||||
|
},
|
||||||
|
router: false,
|
||||||
} }
|
} }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user