mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
Adds missing mock for fetching the brand name
This commit is contained in:
parent
ae0d868681
commit
3636c5e95e
@ -1,9 +1,7 @@
|
||||
import React from 'react';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
|
||||
import { DashboardAPI } from 'api';
|
||||
import { DashboardAPI, RootAPI } from 'api';
|
||||
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
||||
|
||||
import Dashboard from './Dashboard';
|
||||
|
||||
jest.mock('../../api');
|
||||
@ -15,6 +13,11 @@ describe('<Dashboard />', () => {
|
||||
beforeEach(async () => {
|
||||
await act(async () => {
|
||||
DashboardAPI.read.mockResolvedValue({});
|
||||
RootAPI.readAssetVariables.mockResolvedValue({
|
||||
data: {
|
||||
BRAND_NAME: 'AWX',
|
||||
},
|
||||
});
|
||||
graphRequest = DashboardAPI.readJobGraph;
|
||||
graphRequest.mockResolvedValue({});
|
||||
pageWrapper = mountWithContexts(<Dashboard />);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user