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

qunit test case to test kendow window

2 Answers 110 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mohnish
Top achievements
Rank 1
Mohnish asked on 04 Aug 2016, 06:52 AM

Hi,

 

I have a function which opens kendowindow. I am writing a qunit test case to test that particular function whether the particular function is working or not. Please help me with below snippet, where am i going wrong.

Function: addNew: function (e) {

            $("[data-Address]").data("kendoWindow").open();
        }

Test case:

QUnit.test("address", function (assert) {
        var wnd = $("[data-Address]").data("kendoWindow");
       var test= wnd.element.is(":hidden"); 
        cart.addNew();
        assert.equal($("test", false, "address");
    });

 

plz help me where am I gng wrong.

 

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 09 Aug 2016, 07:36 AM
Hello Mohnish,

The Kendo UI Window is tested with QUnit and the tests are publicly available in our open source repository at:

https://github.com/telerik/kendo-ui-core/tree/master/tests/window

A Kendo UI Window close() method test which is similar to the required in your scenario is available in the API testing section at:

https://github.com/telerik/kendo-ui-core/blob/master/tests/window/api.js#L504

Regards,
Alex
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Mohnish
Top achievements
Rank 1
answered on 09 Aug 2016, 08:43 AM
Thank you Alex. I will be using this to perform my unit tests.
Tags
Window
Asked by
Mohnish
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Mohnish
Top achievements
Rank 1
Share this question
or