mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
Fixes bug with workflow form test throwing warning about Failed prop type: The prop value.name is marked as required in OrganizationLookup, but its value is undefined
This commit is contained in:
parent
61f0edc5e8
commit
94b9892a1b
@ -13,9 +13,18 @@ import {
|
||||
InventoriesAPI,
|
||||
ProjectsAPI,
|
||||
CredentialTypesAPI,
|
||||
ExecutionEnvironmentsAPI,
|
||||
CredentialsAPI,
|
||||
} from '../../../api';
|
||||
|
||||
jest.mock('../../../api');
|
||||
jest.mock('../../../api/models/ExecutionEnvironments');
|
||||
jest.mock('../../../api/models/WorkflowJobTemplates');
|
||||
jest.mock('../../../api/models/Labels');
|
||||
jest.mock('../../../api/models/Organizations');
|
||||
jest.mock('../../../api/models/Inventories');
|
||||
jest.mock('../../../api/models/Projects');
|
||||
jest.mock('../../../api/models/CredentialTypes');
|
||||
jest.mock('../../../api/models/Credentials');
|
||||
|
||||
describe('<WorkflowJobTemplateForm/>', () => {
|
||||
let wrapper;
|
||||
@ -61,7 +70,12 @@ describe('<WorkflowJobTemplateForm/>', () => {
|
||||
},
|
||||
});
|
||||
OrganizationsAPI.read.mockResolvedValue({
|
||||
results: [{ id: 1 }, { id: 2 }],
|
||||
data: {
|
||||
results: [
|
||||
{ id: 1, name: 'Organization 1' },
|
||||
{ id: 2, name: 'Organization 2' },
|
||||
],
|
||||
},
|
||||
});
|
||||
InventoriesAPI.read.mockResolvedValue({
|
||||
results: [
|
||||
@ -78,6 +92,18 @@ describe('<WorkflowJobTemplateForm/>', () => {
|
||||
ProjectsAPI.readOptions.mockResolvedValue({
|
||||
data: { actions: { GET: {}, POST: {} } },
|
||||
});
|
||||
ExecutionEnvironmentsAPI.read.mockResolvedValue({
|
||||
data: { results: [] },
|
||||
});
|
||||
ExecutionEnvironmentsAPI.readOptions.mockResolvedValue({
|
||||
data: { actions: { GET: {}, POST: {} } },
|
||||
});
|
||||
CredentialsAPI.read.mockResolvedValue({
|
||||
data: { results: [] },
|
||||
});
|
||||
CredentialsAPI.readOptions.mockResolvedValue({
|
||||
data: { actions: { GET: {}, POST: {} } },
|
||||
});
|
||||
|
||||
history = createMemoryHistory({
|
||||
initialEntries: ['/templates/workflow_job_template/6/edit'],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user