mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Fixes unit tests after updating the Inventory Lookup
This commit is contained in:
@@ -26,7 +26,6 @@ function InventoryLookup({
|
|||||||
hideSmartInventories,
|
hideSmartInventories,
|
||||||
history,
|
history,
|
||||||
isDisabled,
|
isDisabled,
|
||||||
isOverrideDisabled,
|
|
||||||
isPromptableField,
|
isPromptableField,
|
||||||
onBlur,
|
onBlur,
|
||||||
onChange,
|
onChange,
|
||||||
@@ -120,7 +119,7 @@ function InventoryLookup({
|
|||||||
label={t`Inventory`}
|
label={t`Inventory`}
|
||||||
promptId={promptId}
|
promptId={promptId}
|
||||||
promptName={promptName}
|
promptName={promptName}
|
||||||
isDisabled={isOverrideDisabled || isDisabled}
|
isDisabled={isDisabled}
|
||||||
tooltip={t`Select the inventory containing the hosts
|
tooltip={t`Select the inventory containing the hosts
|
||||||
you want this job to manage.`}
|
you want this job to manage.`}
|
||||||
>
|
>
|
||||||
@@ -136,7 +135,7 @@ function InventoryLookup({
|
|||||||
fieldName={fieldName}
|
fieldName={fieldName}
|
||||||
validate={validate}
|
validate={validate}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isDisabled={isOverrideDisabled || isDisabled}
|
isDisabled={isDisabled}
|
||||||
qsConfig={QS_CONFIG}
|
qsConfig={QS_CONFIG}
|
||||||
renderOptionsList={({ state, dispatch, canDelete }) => (
|
renderOptionsList={({ state, dispatch, canDelete }) => (
|
||||||
<OptionsList
|
<OptionsList
|
||||||
@@ -191,7 +190,7 @@ function InventoryLookup({
|
|||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
required={required}
|
required={required}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isDisabled={isOverrideDisabled || isDisabled}
|
isDisabled={isDisabled}
|
||||||
qsConfig={QS_CONFIG}
|
qsConfig={QS_CONFIG}
|
||||||
renderOptionsList={({ state, dispatch, canDelete }) => (
|
renderOptionsList={({ state, dispatch, canDelete }) => (
|
||||||
<OptionsList
|
<OptionsList
|
||||||
@@ -242,7 +241,6 @@ InventoryLookup.propTypes = {
|
|||||||
fieldName: string,
|
fieldName: string,
|
||||||
hideSmartInventories: bool,
|
hideSmartInventories: bool,
|
||||||
isDisabled: bool,
|
isDisabled: bool,
|
||||||
isOverrideDisabled: bool,
|
|
||||||
onChange: func.isRequired,
|
onChange: func.isRequired,
|
||||||
required: bool,
|
required: bool,
|
||||||
validate: func,
|
validate: func,
|
||||||
@@ -255,7 +253,6 @@ InventoryLookup.defaultProps = {
|
|||||||
fieldName: 'inventory',
|
fieldName: 'inventory',
|
||||||
hideSmartInventories: false,
|
hideSmartInventories: false,
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
isOverrideDisabled: false,
|
|
||||||
required: false,
|
required: false,
|
||||||
validate: () => {},
|
validate: () => {},
|
||||||
value: null,
|
value: null,
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ describe('InventoryLookup', () => {
|
|||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Formik>
|
<Formik>
|
||||||
<InventoryLookup isOverrideDisabled onChange={() => {}} />
|
<InventoryLookup onChange={() => {}} />
|
||||||
</Formik>
|
</Formik>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -121,7 +121,7 @@ describe('InventoryLookup', () => {
|
|||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Formik>
|
<Formik>
|
||||||
<InventoryLookup onChange={() => {}} />
|
<InventoryLookup isDisabled onChange={() => {}} />
|
||||||
</Formik>
|
</Formik>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ function WorkflowJobTemplateForm({
|
|||||||
onChange={handleInventoryUpdate}
|
onChange={handleInventoryUpdate}
|
||||||
touched={inventoryMeta.touched}
|
touched={inventoryMeta.touched}
|
||||||
error={inventoryMeta.error}
|
error={inventoryMeta.error}
|
||||||
isOverrideDisabled={isInventoryDisabled}
|
isDisabled={isInventoryDisabled}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FieldWithPrompt
|
<FieldWithPrompt
|
||||||
|
|||||||
Reference in New Issue
Block a user