X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=test%2Funit%2Feffects.js;h=aca9263840d92d2bdfd1a21be5c77944d7f85aad;hb=efaf375e56920c9699c3d4ef09fb9171352aa8bb;hp=74b336f1f9aea35eae4650e8cc647ad4ff4b5d87;hpb=d9478954b9de79a7f3538e935bfd98cdc61ee435;p=jquery.git diff --git a/test/unit/effects.js b/test/unit/effects.js index 74b336f..aca9263 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -130,6 +130,41 @@ test("show(Number) - other displays", function() { }); }); + + +// Supports #7397 +test("Persist correct display value", function() { + expect(4); + QUnit.reset(); + stop(); + + // #show-tests * is set display: none in CSS + jQuery("#main").append('
'); + + var $span = jQuery("#show-tests span"), + orig = $span.css("display"), + num = 0; + + equal(orig, "none", "Expecting to start at display: none"); + + $span.text('Saving...').fadeIn(100, function() { + + equal($span.css("display"), "block", "Expecting display: block"); + + $span.text('Saved!').fadeOut(100, function () { + + equal($span.css("display"), "none", "Expecting display: none"); + + $span.text('Saving...').fadeIn(100, function() { + + equal($span.css("display"), "block", "Expecting display: block"); + + start(); + }); + }); + }); +}); + test("animate(Hash, Object, Function)", function() { expect(1); stop();