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
When one writes tests for a UI using the components, it sometimes requires to access the 'internals' of the component.
An example is the DatePicker. You need to search into the shadowroot for an 'input' element to simulate the user clicking the picker.
Or you need to search using the '.next' css class to get to the button to navigate to the next month.
This makes the tests fragile wrt to changes in the component.
What does the proposed API look like?
I would suggest to add 'data-testid' attributes to internal elements that could be necessary for testing. These attributes should be documented.
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
When one writes tests for a UI using the components, it sometimes requires to access the 'internals' of the component.
An example is the DatePicker. You need to search into the shadowroot for an 'input' element to simulate the user clicking the picker.
Or you need to search using the '.next' css class to get to the button to navigate to the next month.
This makes the tests fragile wrt to changes in the component.
What does the proposed API look like?
I would suggest to add 'data-testid' attributes to internal elements that could be necessary for testing. These attributes should be documented.
The text was updated successfully, but these errors were encountered: