]> source.dussan.org Git - jquery-ui.git/commitdiff
Unit Tests: adding unit test for #7356
authorgnarf <gnarf@gnarf.net>
Thu, 12 May 2011 16:13:25 +0000 (11:13 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 13 May 2011 01:09:37 +0000 (21:09 -0400)
tests/unit/effects/effects_core.js

index 228b6a79c6110558fb076c4dad0e0f496c70426d..044cc16953c7e0d6ce99ed28221ff1ae81ba30db 100644 (file)
@@ -80,4 +80,24 @@ asyncTest( "animateClass works with colors", function() {
        }, 50);
 });
 
+asyncTest( "animateClass works with children", function() {
+       var test = $("div.animateClass"),
+               h2 = test.find("h2");
+       
+       expect(4);
+       test.toggleClass("testChildren", { children: true, duration: 100, complete: function() {
+               equal( h2.css("fontSize"), "20px", "Text size is final during complete");
+               test.toggleClass("testChildren", 100, function() {
+                       equal( h2.css("fontSize"), "10px", "Text size revertted after class removed");
+                       start();
+               });
+               setTimeout(function() {
+                       equal( h2.css("fontSize"), "20px", "Text size unchanged with children: undefined" );
+               }, 50);
+       }});
+       setTimeout(function() {
+               notPresent( h2.css("fontSize"), ["10px","20px"], "Font size is neither endpoint when in middle.");
+       }, 50);
+});
+
 })(jQuery);