You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Field components forward an internal id called sequentialErrorsId to the FieldErrors component. FieldErrors component forwards this id to ErrorMessage component. ErrorMessage components forwards this id to Text.Detail. And Text.Detail components does NOT always forward this id to the underlying element.
This missing id results in difficulties when testing a form field: with testing library, it becomes difficult to identify which element contains the error message. So, test cases where error messages are checked need of boilerplate code.
To Reproduce
Steps to reproduce the behavior:
Go to any app that renders ui-kit field components
Make one form field be in an error state.
Inspect the DOM
Expected behavior
I expect the sequentialErrorsId to be forwarded to the underlying element to easily identify the error message when testing. expect(field).toHaveErrorMessage("whatever")
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
Field components forward an internal id called
sequentialErrorsId
to theFieldErrors
component.FieldErrors
component forwards this id toErrorMessage
component.ErrorMessage
components forwards this id toText.Detail
. AndText.Detail
components does NOT always forward this id to the underlying element.This missing id results in difficulties when testing a form field: with testing library, it becomes difficult to identify which element contains the error message. So, test cases where error messages are checked need of boilerplate code.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the
sequentialErrorsId
to be forwarded to the underlying element to easily identify the error message when testing.expect(field).toHaveErrorMessage("whatever")
Screenshots


The text was updated successfully, but these errors were encountered: