Hello, Doug,
Currently, this can be done using the ref of the component to attach any custom attributes:
https://stackblitz.com/edit/react-befwam?file=app/main.jsx
ref={ref => {
if (ref) {
let gridElement = ref.vs.container.closest(".k-grid");
gridElement.setAttribute('data-testName', 'reactGrid')
}
}}
If this does not work in selenium or jest, I can recommend using classNames. I do understand that this is different from the used pattern, but if we set all passed attributes to the Grid automatically, this can cause unexpected issues.
Regards,
Stefan
Progress Telerik
Progress is here for your business, like always.
Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.