From c08cf8ec6cc9c420173afda79b55c6c32ab89beb Mon Sep 17 00:00:00 2001 From: gnarf Date: Thu, 12 May 2011 11:13:25 -0500 Subject: [PATCH] Unit Tests: adding unit test for #7356 --- tests/unit/effects/effects_core.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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); -- 2.39.5