mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
Fixes failing zuul test
This commit is contained in:
committed by
Jake McDermott
parent
4b62d77015
commit
259e53f59d
@@ -1,10 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Route } from 'react-router-dom';
|
|
||||||
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 InventoryGroups from './InventoryGroups';
|
import InventoryGroups from './InventoryGroups';
|
||||||
|
|
||||||
|
jest.mock('@api');
|
||||||
|
|
||||||
describe('<InventoryGroups />', () => {
|
describe('<InventoryGroups />', () => {
|
||||||
test('initially renders successfully', async () => {
|
test('initially renders successfully', async () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
@@ -15,12 +16,8 @@ describe('<InventoryGroups />', () => {
|
|||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<InventoryGroups setBreadcrumb={() => {}} inventory={inventory} />,
|
||||||
path="/inventories/inventory/:id/groups"
|
|
||||||
component={() => (
|
|
||||||
<InventoryGroups setBreadcrumb={() => {}} inventory={inventory} />
|
|
||||||
)}
|
|
||||||
/>,
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
router: { history, route: { location: history.location } },
|
router: { history, route: { location: history.location } },
|
||||||
@@ -39,12 +36,7 @@ describe('<InventoryGroups />', () => {
|
|||||||
let wrapper;
|
let wrapper;
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<InventoryGroups setBreadcrumb={() => {}} inventory={inventory} />,
|
||||||
path="/inventories/inventory/:id/groups/add"
|
|
||||||
component={() => (
|
|
||||||
<InventoryGroups setBreadcrumb={() => {}} inventory={inventory} />
|
|
||||||
)}
|
|
||||||
/>,
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
router: { history, route: { location: history.location } },
|
router: { history, route: { location: history.location } },
|
||||||
|
|||||||
Reference in New Issue
Block a user