Skip to content

Commit

Permalink
Fixes unit tests after updating the Inventory Lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
mabashian committed Sep 27, 2022
1 parent cc6eaa7 commit 7143777
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
9 changes: 3 additions & 6 deletions awx/ui/src/components/Lookup/InventoryLookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function InventoryLookup({
hideSmartInventories,
history,
isDisabled,
isOverrideDisabled,
isPromptableField,
onBlur,
onChange,
Expand Down Expand Up @@ -120,7 +119,7 @@ function InventoryLookup({
label={t`Inventory`}
promptId={promptId}
promptName={promptName}
isDisabled={isOverrideDisabled || isDisabled}
isDisabled={isDisabled}
tooltip={t`Select the inventory containing the hosts
you want this job to manage.`}
>
Expand All @@ -136,7 +135,7 @@ function InventoryLookup({
fieldName={fieldName}
validate={validate}
isLoading={isLoading}
isDisabled={isOverrideDisabled || isDisabled}
isDisabled={isDisabled}
qsConfig={QS_CONFIG}
renderOptionsList={({ state, dispatch, canDelete }) => (
<OptionsList
Expand Down Expand Up @@ -191,7 +190,7 @@ function InventoryLookup({
onBlur={onBlur}
required={required}
isLoading={isLoading}
isDisabled={isOverrideDisabled || isDisabled}
isDisabled={isDisabled}
qsConfig={QS_CONFIG}
renderOptionsList={({ state, dispatch, canDelete }) => (
<OptionsList
Expand Down Expand Up @@ -242,7 +241,6 @@ InventoryLookup.propTypes = {
fieldName: string,
hideSmartInventories: bool,
isDisabled: bool,
isOverrideDisabled: bool,
onChange: func.isRequired,
required: bool,
validate: func,
Expand All @@ -255,7 +253,6 @@ InventoryLookup.defaultProps = {
fieldName: 'inventory',
hideSmartInventories: false,
isDisabled: false,
isOverrideDisabled: false,
required: false,
validate: () => {},
value: null,
Expand Down
4 changes: 2 additions & 2 deletions awx/ui/src/components/Lookup/InventoryLookup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('InventoryLookup', () => {
await act(async () => {
wrapper = mountWithContexts(
<Formik>
<InventoryLookup isOverrideDisabled onChange={() => {}} />
<InventoryLookup onChange={() => {}} />
</Formik>
);
});
Expand All @@ -121,7 +121,7 @@ describe('InventoryLookup', () => {
await act(async () => {
wrapper = mountWithContexts(
<Formik>
<InventoryLookup onChange={() => {}} />
<InventoryLookup isDisabled onChange={() => {}} />
</Formik>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function WorkflowJobTemplateForm({
onChange={handleInventoryUpdate}
touched={inventoryMeta.touched}
error={inventoryMeta.error}
isOverrideDisabled={isInventoryDisabled}
isDisabled={isInventoryDisabled}
/>
</FormGroup>
<FieldWithPrompt
Expand Down

0 comments on commit 7143777

Please sign in to comment.