Hello,
I am writing Jest tests to ensure my numericTextBox is enabled, and i can't do that easily, because <NumericTextBox/> does not make my data-testid appear in the DOM.
We really want to be writing tests to ensure our components using kendo react perform the right and expected way.
Do you have any alternative to achieve this ?
Thank you
Hi, Thomas,
Thanks a lot for the shared suggestion.
I have converted this thread to an official feature request so we can collect the overall interest in such improvement and plan its implementation accordingly.
I have also updated your Telerik points as a small token of gratitude for the shared feedback.
Regards,
Vessy
Progress Telerik
Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!
OK i will adopt this technique for now, but it would be really usefull to add it to the native component, so we dont have to declare a ref, then assign it an attribute in a useEffect,
like <NumericTextBox data-testid="blabla"> should be a lot better for the developer to use
Hello, Thomas,
Adding the "data-testId" field as a custom attribute to the NumericTextBox will allow you to render it successfully in the DOM:
For convenience, I have created a very basic sample demonstrating this approach:
Please, give it a try and let us know in case we can assist you any further on this matter.
Regards,
Vessy
Progress Telerik
Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!