Unplanned
Last Updated: 18 Sep 2020 11:26 by ADMIN
David
Created on: 10 Sep 2020 00:24
Category: Kendo UI for Angular
Type: Feature Request
13
Request for Angular test harnesses for Kendo components
It would be really helpful if you provided test harnesses for Kendo for Angular.  It is difficult to unit test some of our Angular 9 code without test harnesses.  Plus they are much cleaner than digging into brittle CSS selectors.
5 comments
ADMIN
Martin Bechev
Posted on: 18 Sep 2020 11:26

Hello David, Frank,

Thank you for the provided additional details about this feature request. It really helps to understand your point of view and the benefits of having test harensses. 

That being said I am updating the feature request status to 'Unplanned' for now, and based on the interest we will consider updating our Roadmap accordingly.

Regards,
Martin
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Frank
Posted on: 17 Sep 2020 16:25

I agree with David. I think the point is being missed. We don't want to test the Kendo components themselves. When we test our code that uses your components, we access sometimes to parts of the dom to use in our tests. The great thing about test harnesses, is that when writing our own, we can call the harness of a component we use to get information about the structure of that component. Without it, we'd have use css selectors to get information from dom to allow for interacting. 

Here is another example, I may need to test some code in our ui that gets executed when a grid row is selected. We would need in that case to click a row in the ui as part of the test. With a Kendo provided harness, we'd be able to get access to the rows and click one or more of them. Without the harness, we'd have to write css selectors to find the rows. A harness would make this much simpler.

David
Posted on: 17 Sep 2020 14:22
As an example, if I have a form with kendo buttons and inputs on it, if I had an end to end test that clicked on the input, entered some text, and clicked on the button to submit it, I could do this using test harnesses that had the high level operations on them, rather than having to locate dom elements using selectors.  This is particularly useful for more complex components like dropdowns, where I could instead of having multiple clicks, I could have a selectIndex() method on a Kendo Dropdown Harness instance.
David
Posted on: 17 Sep 2020 14:11
I think you are misunderstand the benefit of the test harnesses. The requested functionality isn't for testing Kendo itself. It's for writing automated tests in Karma and Protractor for applications that use Kendo. The harnesses allow automating user actions on Kendo components so that internal DOM navigation isn't necessary.
ADMIN
Martin Bechev
Posted on: 17 Sep 2020 14:00

Hi David

Thank you for the logged feature request.

The main goal of the Kendo UI for Angular suite is to provide native Angular components. The requested functionality is more related to developing environments and tools that help to test such components, which contradicts the main idea of delivering pure UI components built from the ground-up for Angular. Thus I will proceed by declining this feature request.

All Kendo widgets are tested (unit and e2e). The developer can see all of the implemented tests by obtaining the source code of any package - @progress/kendo-angular-grid for example. Here is the respective article:

https://www.telerik.com/kendo-angular-ui/components/installation/source-code/

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.