I was trying to write some test cases for my js functions, but I am facing an irritating issue.
In my script there is a code section like:
$("idOfTheDiv").fadeOut('fast');
or:
$("idOfTheDiv").fadeTo('fast', 1);
which works fine on my pages.
The problem came when I had wanted to write some js-test-driver unit test cases. When I want to verify the fadeTo function:
...
assertTrue($("#idOfTheDiv").css("opacity") == "0");
...
then it fails.
The reason could be that this is an animation and when I try to verify, it does not finish the animation.
Could somebody know a way to be able to test jQuery animate functions in js-test-driver?