I'm having problems to get all tests to show up as finished, instead they are displayed as still running. This is a sample test case:
StartTest(function (t) {
t.waitForCQ('somecomponentwithabutton', function (somecomponentwithabutton) {
t.diag("somecomponentwithabutton has been loaded.");
var myButton = somecomponentwithabutton[0].down('button');
t.ok(myButton, "myButton has been found");
t.click(myButton, function () {
t.diag("myButton has been clicked");
t.waitForCQ('someresultcomponent', function (someresultcomponent) {
t.ok(someresultcomponent, "someresultcomponent has been found");
t.diag("Test should be done now");
t.done(); //just in case; doesn't change anything, no matter if "needDone" is set to true or false
});
});
});
});
It might be related to t.click because if I run only the first part it works fine and is completed successfully:
StartTest(function (t) {
t.waitForCQ('somecomponentwithabutton', function (somecomponentwithabutton) {
t.diag("somecomponentwithabutton has been loaded.");
var myButton = somecomponentwithabutton[0].down('button');
t.ok(myButton, "myButton has been found");
});
});
Do you have any ideas what might be causing this?
Thanks!
Carina