mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
Adds tooltip to run type that was previously removed. Fixes unit test failures by adding ask_job_type_on_launch to mock data.
This commit is contained in:
parent
a8fa816165
commit
3a2a61af82
@ -8,25 +8,26 @@ import { JobTemplatesAPI, LabelsAPI } from '@api';
|
||||
jest.mock('@api');
|
||||
|
||||
const jobTemplateData = {
|
||||
name: 'Foo',
|
||||
description: 'Baz',
|
||||
job_type: 'run',
|
||||
inventory: 1,
|
||||
project: 2,
|
||||
playbook: 'Bar',
|
||||
forks: 0,
|
||||
limit: '',
|
||||
verbosity: '0',
|
||||
job_slice_count: 1,
|
||||
timeout: 0,
|
||||
job_tags: '',
|
||||
skip_tags: '',
|
||||
diff_mode: false,
|
||||
allow_callbacks: false,
|
||||
allow_simultaneous: false,
|
||||
use_fact_cache: false,
|
||||
ask_job_type_on_launch: false,
|
||||
description: 'Baz',
|
||||
diff_mode: false,
|
||||
forks: 0,
|
||||
host_config_key: '',
|
||||
inventory: 1,
|
||||
job_slice_count: 1,
|
||||
job_tags: '',
|
||||
job_type: 'run',
|
||||
limit: '',
|
||||
name: 'Foo',
|
||||
playbook: 'Bar',
|
||||
project: 2,
|
||||
scm_branch: '',
|
||||
skip_tags: '',
|
||||
timeout: 0,
|
||||
use_fact_cache: false,
|
||||
verbosity: '0',
|
||||
};
|
||||
|
||||
describe('<JobTemplateAdd />', () => {
|
||||
|
@ -9,27 +9,24 @@ import JobTemplateEdit from './JobTemplateEdit';
|
||||
jest.mock('@api');
|
||||
|
||||
const mockJobTemplate = {
|
||||
id: 1,
|
||||
name: 'Foo',
|
||||
description: 'Bar',
|
||||
job_type: 'run',
|
||||
inventory: 2,
|
||||
project: 3,
|
||||
playbook: 'Baz',
|
||||
type: 'job_template',
|
||||
forks: 0,
|
||||
limit: '',
|
||||
verbosity: '0',
|
||||
job_slice_count: 1,
|
||||
timeout: 0,
|
||||
job_tags: '',
|
||||
skip_tags: '',
|
||||
diff_mode: false,
|
||||
allow_callbacks: false,
|
||||
allow_simultaneous: false,
|
||||
use_fact_cache: false,
|
||||
ask_job_type_on_launch: false,
|
||||
description: 'Bar',
|
||||
diff_mode: false,
|
||||
forks: 0,
|
||||
host_config_key: '',
|
||||
id: 1,
|
||||
inventory: 2,
|
||||
job_slice_count: 1,
|
||||
job_tags: '',
|
||||
job_type: 'run',
|
||||
limit: '',
|
||||
name: 'Foo',
|
||||
playbook: 'Baz',
|
||||
project: 3,
|
||||
scm_branch: '',
|
||||
skip_tags: '',
|
||||
summary_fields: {
|
||||
user_capabilities: {
|
||||
edit: true,
|
||||
@ -50,6 +47,10 @@ const mockJobTemplate = {
|
||||
name: 'Boo',
|
||||
},
|
||||
},
|
||||
timeout: 0,
|
||||
type: 'job_template',
|
||||
use_fact_cache: false,
|
||||
verbosity: '0',
|
||||
};
|
||||
|
||||
const mockRelatedCredentials = {
|
||||
|
@ -230,10 +230,14 @@ class JobTemplateForm extends Component {
|
||||
/>
|
||||
<FieldWithPrompt
|
||||
fieldId="template-job-type"
|
||||
isRequired
|
||||
label={i18n._(t`Job Type`)}
|
||||
promptId="template-ask-job-type-on-launch"
|
||||
promptName="ask_job_type_on_launch"
|
||||
isRequired
|
||||
tooltip={i18n._(t`For job templates, select run to execute
|
||||
the playbook. Select check to only check playbook syntax,
|
||||
test environment setup, and report problems without
|
||||
executing the playbook.`)}
|
||||
>
|
||||
<Field
|
||||
name="job_type"
|
||||
|
Loading…
Reference in New Issue
Block a user