Hi,
I would like to know where to start or if it is even possible to test using QUnit an igCombo DOM element (created with MVC Helpers). I would like to test its datasource and some options if are enabled or not.
Any suggestions are highly appreciated,
Kind regards,
Zora
hi Zora,
you should have your Qunit references and test initialization logic on the same page where your widgets are loaded, that is, in the aspx. Since Qunit is a unit testing solution, it cannot fire up and load URLs for arbitrary web apps. That's something you can tackle with Selenium Web Driver.
you can, of course, still have your test code in a separate .js file and reference it in the aspx.
Thanks
Angel
Hi Konstantin,
Thank you for your patience trying to help me! Here I attach the JS test files, but the igCombo is initialized using ASP MVC helpers, in my aspx page. Probably that is the issue, I don't have access from my test page (testrunner.html) to the igCombo (which is defined in a partial view).
Do you have an idea how can I overcome this?
Hi again,
So have you initialized an igCombo up to the point where your test fails? Please provide the entire code sample.
Thank you for your patience!
Yes I've replaced $("#igCombo").data('igCombo') with $("#igCombo").data('ui-igCombo') but I got the same error, element undefined. The JQuery UI script is 1.8.7.
I've tried to create the igCombo in javascript, but when I call the function updateComboDatasource(data){} from the javascript file that I'm testing it tells me that $("#igCombo").data('ui-igCombo') is undefined.
Do you have any small example that works? It can be with any infragistics control, any idea is more than welcome...
Hey Zora,
This doesn't have to do with the version of jQuery but rather with the version of jQuery-UI. Did you try extracting the data with string "ui-igCombo"?
Thank you for using the Infragistics forums!