mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Adds resource name and description to launch and schedule prompt wizards
This commit is contained in:
parent
4e129d3d04
commit
dc64da6f72
@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Wizard } from '@patternfly/react-core';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
import { Formik, useFormikContext } from 'formik';
|
||||
import ContentError from '../ContentError';
|
||||
@ -102,7 +101,8 @@ function PromptModalForm({
|
||||
validateStep(nextStep.id);
|
||||
}
|
||||
}}
|
||||
title={t`Prompts`}
|
||||
title={t`Launch | ${resource.name}`}
|
||||
description={resource.description}
|
||||
steps={
|
||||
isReady
|
||||
? steps
|
||||
|
||||
@ -24,6 +24,8 @@ jest.mock('../../api/models/JobTemplates');
|
||||
let config;
|
||||
const resource = {
|
||||
id: 1,
|
||||
description: 'Foo Description',
|
||||
name: 'Foobar',
|
||||
type: 'job_template',
|
||||
};
|
||||
const noop = () => {};
|
||||
@ -147,6 +149,10 @@ describe('LaunchPrompt', () => {
|
||||
expect(steps[3].name.props.children).toEqual('Other prompts');
|
||||
expect(steps[4].name.props.children).toEqual('Survey');
|
||||
expect(steps[5].name.props.children).toEqual('Preview');
|
||||
expect(wizard.find('WizardHeader').prop('title')).toBe('Launch | Foobar');
|
||||
expect(wizard.find('WizardHeader').prop('description')).toBe(
|
||||
'Foo Description'
|
||||
);
|
||||
});
|
||||
|
||||
test('should add inventory step', async () => {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Wizard } from '@patternfly/react-core';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
import { useFormikContext } from 'formik';
|
||||
import AlertModal from '../../AlertModal';
|
||||
@ -37,7 +36,6 @@ function SchedulePromptableFields({
|
||||
launchConfig,
|
||||
schedule,
|
||||
resource,
|
||||
|
||||
credentials,
|
||||
resourceDefaultCredentials
|
||||
);
|
||||
@ -107,7 +105,8 @@ function SchedulePromptableFields({
|
||||
validateStep(nextStep.id);
|
||||
}
|
||||
}}
|
||||
title={t`Prompts`}
|
||||
title={t`Prompt | ${resource.name}`}
|
||||
description={resource.description}
|
||||
steps={
|
||||
isReady
|
||||
? steps
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user