test(e2e,playwright): form-helper component (#51974)

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
This commit is contained in:
Shabeeb Khalid
2023-10-18 16:35:30 -05:00
committed by GitHub
co-authored by Naomi Carrigan
parent a63f7d9e85
commit c1a09c2154
3 changed files with 104 additions and 1 deletions
@@ -92,7 +92,12 @@ function FormFields({ formFields, options }: FormFieldsProps): JSX.Element {
const isURL = types[name] === 'url';
return (
<FormGroup key={name}>
<ControlLabel htmlFor={name}>{label}</ControlLabel>
<ControlLabel
htmlFor={name}
data-playwright-test-label={`${name}-control-label`}
>
{label}
</ControlLabel>
<FormControl
id={name}
name={name}
@@ -102,6 +107,7 @@ function FormFields({ formFields, options }: FormFieldsProps): JSX.Element {
rows={4}
type='url'
value={value as string}
data-playwright-test-label={`${name}-form-control`}
/>
{nullOrWarning(
value as string,
@@ -107,6 +107,7 @@ export const StrictSolutionForm = ({
id={`dynamic-${id}`}
onSubmit={handleSubmit as (e: FormEvent) => void}
style={{ width: '100%' }}
data-playwright-test-label='form-helper-form'
>
<FormFields formFields={formFields} options={options} />
<BlockSaveButton