From: gnarf Date: Thu, 12 May 2011 16:13:25 +0000 (-0500) Subject: Unit Tests: adding unit test for #7356 X-Git-Tag: 1.9m5~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c08cf8ec6cc9c420173afda79b55c6c32ab89beb;p=jquery-ui.git Unit Tests: adding unit test for #7356 --- diff --git a/tests/unit/effects/effects_core.js b/tests/unit/effects/effects_core.js index 228b6a79c..044cc1695 100644 --- a/tests/unit/effects/effects_core.js +++ b/tests/unit/effects/effects_core.js @@ -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);