qunit test case to test kendow window

3 posts, 0 answers
  1. Mohnish
    Mohnish avatar
    9 posts
    Member since:
    Mar 2016

    Posted 04 Aug Link to this post

    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. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    119 posts

    Posted 09 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. Mohnish
    Mohnish avatar
    9 posts
    Member since:
    Mar 2016

    Posted 09 Aug in reply to Alex Hajigeorgieva Link to this post

    Thank you Alex. I will be using this to perform my unit tests.
Back to Top