mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-24 23:49:06 +08:00
test(e2e,playwright): form-helper component (#51974)
Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
This commit is contained in:
co-authored by
Naomi Carrigan
parent
a63f7d9e85
commit
c1a09c2154
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user