0

I tried this

<TextInputField value={emailValue} error={emailError} errorProps={{ 'data-testid': 'emailError' }} helperText={emailError && 'Enter email address in format: yourname@example.com'} type='email' length={100} onChangeAction={setEmail} label='Email' />

But this does not set a data-testId on the error field.

Kimaya
  • 782
  • 1
  • 10
  • 26

1 Answers1

1

I had to put FormHelperTextProps={{ 'data-testid': 'emailError' }} and not errorProps

Kimaya
  • 782
  • 1
  • 10
  • 26