This is a migrated thread and some comments may be shown as answers.

Testing grid grouping selnium

1 Answer 248 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 20 Jul 2018, 08:13 AM

 

Hi there

 

We're using selenium to generate our end to end tests. We are struggling to automate the drag and drop support for column grouping. Do you have any guidelines on how to test this functionality?

 

Thanks

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 24 Jul 2018, 06:22 AM
Hi,

The e2e test suite in the package source includes a test for drag-and-drop grouping:
(kendo-angular-grid/e2e/grouping.spec.ts)

import { browser, element, by } from '@progress/kendo-angular-e2e';
import { pointerDown, pointerMove, pointerUp } from '@progress/kendo-angular-e2e';

...
    it('should allow grouping by drag-and-drop', async () => {
        const headerSelector = 'th:nth-child(3)';
        await pointerDown(headerSelector);

        await browser.sleep(200);
        await pointerMove(headerSelector, 200, 25);
        await browser.sleep(200);
        await pointerUp(headerSelector, 200, 25);

        const groupingHeader = element(by.css('tr[kendogridgroupheader]'));
        expect(await groupingHeader.isDisplayed()).toBe(true);

        const removeGroup = element(by.css('kendo-grid-group-panel .k-icon.k-i-group-delete'));
        await removeGroup.click();
        expect(await groupingHeader.isPresent()).toBe(false);
    });...


The pointerDown, pointerMove and pointerUp are included in an auxiliary package that is not officially supported.
I've made they source available in a gist, if you'd like to omit the dependency to it.

Best Regards,
T. Tsonev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
n/a
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or