fundamental-ngx icon indicating copy to clipboard operation
fundamental-ngx copied to clipboard

Fundamentals Wizard Generator: Mark every control with data-testid

Open droshev opened this issue 2 years ago • 0 comments

Is this a bug, enhancement, or feature request?

feature request

Briefly describe your proposal.

Problem: As there are no data-testids, in test automation tools like Cypress, we have to locate elements by id or label. The id is something like fdp-id-9 and changes over time. The label is not a unique identifier if there exist multiple labels with the same name.

Proposed solution:

Define an additional data-testid property for each wizard control that the developer can set

By default, set every data-testid to the "name" property control of the property as this is sort of the ID.

As select-items and radio-button items are also distinct html elements, they should also carry data-testids which could be a combination of the name of the select/radio-button and the text for the item.

dxp/template-ui/issues/275

droshev avatar Sep 22 '22 15:09 droshev