mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 08:37:48 -02:30
Adds elements and identifiers for cypress tests
Properly display instance groups and labels on node details view
This commit is contained in:
@@ -132,7 +132,7 @@ function CredentialsStep({
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div data-cy="credentials-prompt">
|
||||
{meta.error && (
|
||||
<CredentialErrorAlert variant="danger" isInline title={meta.error} />
|
||||
)}
|
||||
@@ -208,7 +208,7 @@ function CredentialsStep({
|
||||
}}
|
||||
renderItemChip={renderChip}
|
||||
/>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ function ExecutionEnvironmentStep() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div data-cy="execution-environment-prompt">
|
||||
<OptionsList
|
||||
value={field.value ? [field.value] : []}
|
||||
options={execution_environments}
|
||||
@@ -110,6 +111,7 @@ function ExecutionEnvironmentStep() {
|
||||
selectItem={helpers.setValue}
|
||||
deselectItem={() => helpers.setValue(null)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ function InstanceGroupsStep() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div data-cy="instance-groups-prompt">
|
||||
<OptionsList
|
||||
value={selected}
|
||||
options={instance_groups}
|
||||
@@ -100,6 +101,7 @@ function InstanceGroupsStep() {
|
||||
sortSelectedItems={(selectedItems) => setSelected(selectedItems)}
|
||||
isSelectedDraggable
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ function InventoryStep({ warningMessage = null }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div data-cy="inventory-prompt">
|
||||
{meta.touched && meta.error && (
|
||||
<InventoryErrorAlert variant="danger" isInline title={meta.error} />
|
||||
)}
|
||||
@@ -109,7 +109,7 @@ function InventoryStep({ warningMessage = null }) {
|
||||
selectItem={helpers.setValue}
|
||||
deselectItem={() => field.onChange(null)}
|
||||
/>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ function OtherPromptsStep({ launchConfig, variablesMode, onVarModeChange }) {
|
||||
? jobHelpText
|
||||
: workflowHelpText;
|
||||
return (
|
||||
<div data-cy="other-prompts">
|
||||
<Form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
@@ -117,6 +118,7 @@ function OtherPromptsStep({ launchConfig, variablesMode, onVarModeChange }) {
|
||||
/>
|
||||
)}
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ function PreviewStep({ resource, launchConfig, surveyConfig, formErrors }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div data-cy="prompt-preview">
|
||||
{formErrors && (
|
||||
<ErrorMessageWrapper>
|
||||
{t`Some of the previous step(s) have errors`}
|
||||
@@ -70,7 +70,7 @@ function PreviewStep({ resource, launchConfig, surveyConfig, formErrors }) {
|
||||
launchConfig={launchConfig}
|
||||
overrides={overrides}
|
||||
/>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ function SurveyStep({ surveyConfig }) {
|
||||
float: NumberField,
|
||||
};
|
||||
return (
|
||||
<div data-cy="survey-prompts">
|
||||
<Form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
@@ -41,6 +42,7 @@ function SurveyStep({ surveyConfig }) {
|
||||
return <Field key={question.variable} question={question} />;
|
||||
})}
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
SurveyStep.propTypes = {
|
||||
|
||||
@@ -19,6 +19,8 @@ function NodeViewModal({ readOnly }) {
|
||||
const {
|
||||
fullUnifiedJobTemplate,
|
||||
originalNodeCredentials,
|
||||
originalNodeInstanceGroups,
|
||||
originalNodeLabels,
|
||||
originalNodeObject,
|
||||
promptValues,
|
||||
} = nodeToView;
|
||||
@@ -160,7 +162,7 @@ function NodeViewModal({ readOnly }) {
|
||||
originalNodeObject.summary_fields.execution_environment;
|
||||
}
|
||||
if (launchConfig.ask_labels_on_launch) {
|
||||
overrides.labels = originalNodeObject.labels;
|
||||
overrides.labels = originalNodeLabels || [];
|
||||
}
|
||||
if (launchConfig.ask_forks_on_launch) {
|
||||
overrides.forks = originalNodeObject.forks;
|
||||
@@ -204,6 +206,9 @@ function NodeViewModal({ readOnly }) {
|
||||
if (launchConfig.ask_credential_on_launch) {
|
||||
overrides.credentials = originalNodeCredentials || [];
|
||||
}
|
||||
if (launchConfig.ask_instance_groups_on_launch) {
|
||||
overrides.instance_groups = originalNodeInstanceGroups || [];
|
||||
}
|
||||
}
|
||||
|
||||
let nodeUpdatedConvergence = {};
|
||||
|
||||
Reference in New Issue
Block a user