Fix prop type errors in unit tests

This commit is contained in:
Marliana Lara
2020-10-19 17:21:40 -04:00
parent f369f8535d
commit 5d0b001764
3 changed files with 16 additions and 5 deletions

View File

@@ -17,6 +17,10 @@ const verbosityOptions = [
{ value: '3', key: '3', label: '3 (Debug)' },
{ value: '4', key: '4', label: '4 (Connection Debug)' },
];
const moduleOptions = [
['command', 'command'],
['shell', 'shell'],
];
const adHocItems = [
{ name: 'Inventory 1' },
{ name: 'Inventory 2' },
@@ -31,7 +35,7 @@ describe('<AdHocCommandsWizard/>', () => {
<AdHocCommandsWizard
adHocItems={adHocItems}
onLaunch={onLaunch}
moduleOptions={[]}
moduleOptions={moduleOptions}
verbosityOptions={verbosityOptions}
onCloseWizard={() => {}}
credentialTypeId={1}

View File

@@ -41,6 +41,7 @@ const InventoryLookupField = withI18n()(({ i18n, host }) => {
helperTextInvalid={inventoryMeta.error}
>
<InventoryLookup
fieldId="inventory-lookup"
value={inventory}
onBlur={() => inventoryHelpers.setTouched()}
tooltip={i18n._(t`Select the inventory that this host will belong to.`)}

View File

@@ -274,7 +274,8 @@ function JobTemplateForm({
promptId="template-ask-scm-branch-on-launch"
promptName="ask_scm_branch_on_launch"
tooltip={i18n._(
t`Select a branch for the job template. This branch is applied to all job template nodes that prompt for a branch.`
t`Select a branch for the job template. This branch is applied to
all job template nodes that prompt for a branch.`
)}
>
<TextInput
@@ -354,7 +355,10 @@ function JobTemplateForm({
label={i18n._(t`Variables`)}
promptId="template-ask-variables-on-launch"
tooltip={i18n._(
t`Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter for ansible-playbook. Provide key/value pairs using either YAML or JSON. Refer to the Ansible Tower documentation for example syntax.`
t`Pass extra command line variables to the playbook. This is the
-e or --extra-vars command line parameter for ansible-playbook.
Provide key/value pairs using either YAML or JSON. Refer to the
Ansible Tower documentation for example syntax.`
)}
/>
<FormColumnLayout>
@@ -439,7 +443,7 @@ function JobTemplateForm({
promptName="ask_diff_mode_on_launch"
tooltip={i18n._(t`If enabled, show the changes made by
Ansible tasks, where supported. This is equivalent
to Ansible&#x2019s --diff mode.`)}
to Ansible's --diff mode.`)}
>
<Switch
id="template-show-changes"
@@ -548,7 +552,9 @@ function JobTemplateForm({
name="use_fact_cache"
label={i18n._(t`Enable Fact Storage`)}
tooltip={i18n._(
t`If enabled, this will store gathered facts so they can be viewed at the host level. Facts are persisted and injected into the fact cache at runtime.`
t`If enabled, this will store gathered facts so they can
be viewed at the host level. Facts are persisted and
injected into the fact cache at runtime.`
)}
/>
</FormCheckboxLayout>