mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Mark Host Config Key as a required field
Mark `Host Config Key` as a required field See:https://github.com/ansible/awx/issues/4968
This commit is contained in:
@@ -36,7 +36,7 @@ const mockJobTemplate = {
|
|||||||
diff_mode: false,
|
diff_mode: false,
|
||||||
extra_vars: '---',
|
extra_vars: '---',
|
||||||
forks: 0,
|
forks: 0,
|
||||||
host_config_key: '',
|
host_config_key: '1234',
|
||||||
id: 1,
|
id: 1,
|
||||||
inventory: 2,
|
inventory: 2,
|
||||||
job_slice_count: 1,
|
job_slice_count: 1,
|
||||||
@@ -225,6 +225,10 @@ describe('<JobTemplateEdit />', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
await waitForElement(wrapper, 'EmptyStateBody', el => el.length === 0);
|
await waitForElement(wrapper, 'EmptyStateBody', el => el.length === 0);
|
||||||
|
expect(wrapper.find('FormGroup[label="Host Config Key"]').length).toBe(1);
|
||||||
|
expect(
|
||||||
|
wrapper.find('FormGroup[label="Host Config Key"]').prop('isRequired')
|
||||||
|
).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('handleSubmit should call api update', async () => {
|
test('handleSubmit should call api update', async () => {
|
||||||
|
|||||||
@@ -589,6 +589,7 @@ function JobTemplateForm({
|
|||||||
validate={
|
validate={
|
||||||
allowCallbacks ? required(null, i18n) : null
|
allowCallbacks ? required(null, i18n) : null
|
||||||
}
|
}
|
||||||
|
isRequired={allowCallbacks}
|
||||||
/>
|
/>
|
||||||
</FormColumnLayout>
|
</FormColumnLayout>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ describe('<JobTemplateForm />', () => {
|
|||||||
webhook_key: 'webhook key',
|
webhook_key: 'webhook key',
|
||||||
webhook_service: 'github',
|
webhook_service: 'github',
|
||||||
webhook_credential: 7,
|
webhook_credential: 7,
|
||||||
|
host_config_key: '',
|
||||||
};
|
};
|
||||||
const mockInstanceGroups = [
|
const mockInstanceGroups = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user