Hi,
I am new to jquery mobile and have created 2 themes for my work. I have created different dynamic css files and have different image files for different UI widgets and just want to write the test cases using QUnit to check whether everything works fine. I guess there may be other ways to check whether the theme is loaded properly or not, but I need to do it using QUnit. But I am not sure how to go ahead with that as all the css classes etc does not seem to be available when i cheek them using QUnit.
I have following things available with me.
A simple HTML page which creates a widget(like popup widget)
Files for the widget generation code.
dynamic css(.less) files defining the rules/resources to be used.
I need to know how a can I write simple test cases for the HTML page i have created and check whether the theme is loaded properly or not?
I have tried something like this in my test.js file (a few lines from the file is here)
creating a widget like
...
var popup = widget.popup;
equal(popup.is(".ui-no-icon"), true, "popup without icon test");
equal(popup.css("background-color"), rgb(240,123,137), "popup color test");
...
while 1st test is passing, code dies in the second case. (Assuming that .ui-no-icon and other such classes) are already added/existing in the jquery widget code.)
Please let me know if anyone has any idea or need any further information on question.