Test Id is added to all Tiller component so finding a field is much faster, easier and more reliable.
Current behaviour
Some components like toggle buttons, upload file component, buttons do not have any test Id like it is with input field (testId: input-firstName) so I need to find a component by it's label, for example label. r('div').filter({ hasText: /^Show All$/ }).
Wanted behaviour
We want the data-testid to be generated for all Tiller components based on the field name.
That would enable our automated testing code to find these fields via their id, whereas now the field can't be found directly/reliably.
This is the preferred method of finding elements. For example, this is a code sample from Playwright framework:
await page.getByTestId('checkbox-showAll').click();
Possible workarounds
As a workaround, we currently try and find the toggle by looking up the label associated with it and then looking for the checkbox inside that div.
Basic information
Additional information
None.
Enhancement description
Test Id is added to all Tiller component so finding a field is much faster, easier and more reliable.
Current behaviour
Some components like toggle buttons, upload file component, buttons do not have any test Id like it is with input field (testId: input-firstName) so I need to find a component by it's label, for example
label. r('div').filter({ hasText: /^Show All$/ })
.Wanted behaviour
We want the data-testid to be generated for all Tiller components based on the field name. That would enable our automated testing code to find these fields via their id, whereas now the field can't be found directly/reliably.
This is the preferred method of finding elements. For example, this is a code sample from Playwright framework: await page.getByTestId('checkbox-showAll').click();
Possible workarounds
As a workaround, we currently try and find the toggle by looking up the label associated with it and then looking for the checkbox inside that div.