From e21d09b90906c101f46767cf4a7699a573477745 Mon Sep 17 00:00:00 2001 From: regexowl Date: Wed, 12 Mar 2025 11:58:29 +0100 Subject: [PATCH] Wizard: Return of the testid This adds `data-testid` back to the blueprint name input. --- src/Components/CreateImageWizard/ValidatedInput.tsx | 6 +++++- src/Components/CreateImageWizard/steps/Details/index.tsx | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Components/CreateImageWizard/ValidatedInput.tsx b/src/Components/CreateImageWizard/ValidatedInput.tsx index 47fdbc38..f7809f54 100644 --- a/src/Components/CreateImageWizard/ValidatedInput.tsx +++ b/src/Components/CreateImageWizard/ValidatedInput.tsx @@ -16,7 +16,7 @@ import { EyeIcon, EyeSlashIcon } from '@patternfly/react-icons'; import type { StepValidation } from './utilities/useValidation'; type ValidatedTextInputPropTypes = TextInputProps & { - dataTestId?: string | undefined; + dataTestId?: string; ouiaId?: string; ariaLabel: string | undefined; helperText: string | undefined; @@ -43,6 +43,7 @@ type ValidationInputProp = TextInputProps & value: string; placeholder: string; stepValidation: StepValidation; + dataTestId?: string; fieldName: string; inputType?: 'textInput' | 'textArea'; ariaLabel: string; @@ -115,6 +116,7 @@ export const ValidatedInputAndTextArea = ({ stepValidation, fieldName, placeholder, + dataTestId, onChange, ariaLabel, inputType = 'textInput', @@ -148,6 +150,7 @@ export const ValidatedInputAndTextArea = ({ onBlur={handleBlur} placeholder={placeholder} aria-label={ariaLabel} + data-testid={dataTestId} /> ) : ( )} {hasError && } diff --git a/src/Components/CreateImageWizard/steps/Details/index.tsx b/src/Components/CreateImageWizard/steps/Details/index.tsx index 03f860af..7d41c735 100644 --- a/src/Components/CreateImageWizard/steps/Details/index.tsx +++ b/src/Components/CreateImageWizard/steps/Details/index.tsx @@ -60,6 +60,7 @@ const DetailsStep = () => {