mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 05:31:22 -03: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:
parent
bf6064db21
commit
4268f1aeeb
@ -36,7 +36,7 @@ const mockJobTemplate = {
|
||||
diff_mode: false,
|
||||
extra_vars: '---',
|
||||
forks: 0,
|
||||
host_config_key: '',
|
||||
host_config_key: '1234',
|
||||
id: 1,
|
||||
inventory: 2,
|
||||
job_slice_count: 1,
|
||||
@ -225,6 +225,10 @@ describe('<JobTemplateEdit />', () => {
|
||||
);
|
||||
});
|
||||
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 () => {
|
||||
|
||||
@ -589,6 +589,7 @@ function JobTemplateForm({
|
||||
validate={
|
||||
allowCallbacks ? required(null, i18n) : null
|
||||
}
|
||||
isRequired={allowCallbacks}
|
||||
/>
|
||||
</FormColumnLayout>
|
||||
</>
|
||||
|
||||
@ -56,6 +56,7 @@ describe('<JobTemplateForm />', () => {
|
||||
webhook_key: 'webhook key',
|
||||
webhook_service: 'github',
|
||||
webhook_credential: 7,
|
||||
host_config_key: '',
|
||||
};
|
||||
const mockInstanceGroups = [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user