mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Add name/description to mock resources in tests
This commit is contained in:
parent
d711a9aed3
commit
ec78f5a9ec
@ -66,6 +66,8 @@ describe('<ScheduleAdd />', () => {
|
||||
type: 'job_template',
|
||||
inventory: 2,
|
||||
summary_fields: { credentials: [] },
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
launchConfig={launchConfig}
|
||||
/>
|
||||
@ -417,6 +419,8 @@ describe('<ScheduleAdd />', () => {
|
||||
type: 'job_template',
|
||||
inventory: 2,
|
||||
summary_fields: { credentials: [] },
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
launchConfig={launchConfig}
|
||||
surveyConfig={{
|
||||
|
||||
@ -142,6 +142,8 @@ describe('<ScheduleEdit />', () => {
|
||||
{ name: 'job template credential', id: 75, kind: 'ssh' },
|
||||
],
|
||||
},
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
resourceDefaultCredentials={[]}
|
||||
launchConfig={{
|
||||
@ -654,6 +656,8 @@ describe('<ScheduleEdit />', () => {
|
||||
{ name: 'job template credential', id: 75, kind: 'ssh' },
|
||||
],
|
||||
},
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
resourceDefaultCredentials={[]}
|
||||
launchConfig={{
|
||||
|
||||
@ -150,7 +150,12 @@ describe('<ScheduleForm />', () => {
|
||||
description: '',
|
||||
},
|
||||
}}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@ -199,7 +204,13 @@ describe('<ScheduleForm />', () => {
|
||||
description: '',
|
||||
},
|
||||
}}
|
||||
resource={{ id: 23, type: 'job_template', inventory: 1 }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
inventory: 1,
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@ -232,6 +243,8 @@ describe('<ScheduleForm />', () => {
|
||||
summary_fields: {
|
||||
credentials: [],
|
||||
},
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
launchConfig={{
|
||||
can_start_without_user_input: false,
|
||||
@ -370,6 +383,8 @@ describe('<ScheduleForm />', () => {
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
launchConfig={{
|
||||
can_start_without_user_input: false,
|
||||
@ -422,7 +437,13 @@ describe('<ScheduleForm />', () => {
|
||||
<ScheduleForm
|
||||
handleSubmit={jest.fn()}
|
||||
handleCancel={jest.fn()}
|
||||
resource={{ id: 23, type: 'job_template', inventory: 1 }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
inventory: 1,
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
launchConfig={{
|
||||
can_start_without_user_input: true,
|
||||
passwords_needed_to_start: [],
|
||||
@ -758,7 +779,12 @@ describe('<ScheduleForm />', () => {
|
||||
handleSubmit={jest.fn()}
|
||||
handleCancel={jest.fn()}
|
||||
schedule={{ inventory: null, ...mockSchedule }}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
launchConfig={{
|
||||
can_start_without_user_input: true,
|
||||
passwords_needed_to_start: [],
|
||||
@ -794,7 +820,12 @@ describe('<ScheduleForm />', () => {
|
||||
<ScheduleForm
|
||||
handleSubmit={jest.fn()}
|
||||
handleCancel={jest.fn()}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
launchConfig={{
|
||||
can_start_without_user_input: true,
|
||||
passwords_needed_to_start: [],
|
||||
@ -835,6 +866,8 @@ describe('<ScheduleForm />', () => {
|
||||
id: 23,
|
||||
type: 'project',
|
||||
inventory: 2,
|
||||
name: 'Foo Project',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@ -858,7 +891,12 @@ describe('<ScheduleForm />', () => {
|
||||
handleCancel={jest.fn()}
|
||||
schedule={mockSchedule}
|
||||
launchConfig={{ inventory_needed_to_start: false }}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@ -888,7 +926,12 @@ describe('<ScheduleForm />', () => {
|
||||
'DTSTART;TZID=America/New_York:20200402T144500 RRULE:INTERVAL=10;FREQ=MINUTELY',
|
||||
dtend: null,
|
||||
})}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@ -923,7 +966,12 @@ describe('<ScheduleForm />', () => {
|
||||
dtend: '2020-04-03T03:45:00Z',
|
||||
until: '',
|
||||
})}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@ -959,7 +1007,12 @@ describe('<ScheduleForm />', () => {
|
||||
dtend: null,
|
||||
until: '',
|
||||
})}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
expect(wrapper.find('ScheduleForm').length).toBe(1);
|
||||
@ -994,7 +1047,12 @@ describe('<ScheduleForm />', () => {
|
||||
dtend: '2020-10-30T18:45:00Z',
|
||||
until: '2021-01-01T00:00:00',
|
||||
})}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@ -1053,7 +1111,12 @@ describe('<ScheduleForm />', () => {
|
||||
dtend: null,
|
||||
until: '',
|
||||
})}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
expect(wrapper.find('ScheduleForm').length).toBe(1);
|
||||
@ -1100,7 +1163,12 @@ describe('<ScheduleForm />', () => {
|
||||
dtend: null,
|
||||
until: '',
|
||||
})}
|
||||
resource={{ id: 23, type: 'job_template' }}
|
||||
resource={{
|
||||
id: 23,
|
||||
type: 'job_template',
|
||||
name: 'Foo Job Template',
|
||||
description: '',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
expect(wrapper.find('ScheduleForm').length).toBe(1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user