From: Timmy Willison Date: Tue, 12 May 2015 13:58:55 +0000 (-0400) Subject: Tests: fix tests in accordance with new :visible behavior X-Git-Tag: 3.0.0-alpha1~50 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=16713fb6097849727de2ba1b489c98e242a168c3;p=jquery.git Tests: fix tests in accordance with new :visible behavior --- diff --git a/test/unit/css.js b/test/unit/css.js index a3be0d405..4d0e11b3b 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -924,9 +924,9 @@ test( "css opacity consistency across browsers (#12685)", function() { }); test( ":visible/:hidden selectors", function() { - expect( 18 ); + expect( 17 ); - var $div, $br, $table, $a; + var $div, $table, $a; ok( jQuery("#nothiddendiv").is(":visible"), "Modifying CSS display: Assert element is visible" ); jQuery("#nothiddendiv").css({ display: "none" }); @@ -948,8 +948,10 @@ test( ":visible/:hidden selectors", function() { $div.css( { width: 0, height: 0, overflow: "hidden" } ); ok( $div.is( ":visible" ), "Div with width and height of 0 is still visible (gh-2227)" ); - $br = jQuery( "
" ).appendTo( "#qunit-fixture" ); - ok( $br.is( ":visible" ), "br element is visible" ); + // Safari 6-7 and iOS 6-7 report 0 width for br elements + // When newer browsers propagate, re-enable this test + // $br = jQuery( "
" ).appendTo( "#qunit-fixture" ); + // ok( $br.is( ":visible" ), "br element is visible" ); $table = jQuery("#table"); $table.html("cellcell"); diff --git a/test/unit/effects.js b/test/unit/effects.js index f23342c56..571fda031 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -27,7 +27,7 @@ module("effects", { test("sanity check", function() { expect(1); - equal( jQuery("#dl:visible, #qunit-fixture:visible, #foo:visible").length, 2, "QUnit state is correct for testing effects" ); + equal( jQuery("#dl:visible, #qunit-fixture:visible, #foo:visible").length, 3, "QUnit state is correct for testing effects" ); }); test("show() basic", 1, function() {