Skip to content

Commit 16713fb

Browse files
committed
Tests: fix tests in accordance with new :visible behavior
1 parent 79bcb29 commit 16713fb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/unit/css.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -924,9 +924,9 @@ test( "css opacity consistency across browsers (#12685)", function() {
924924
});
925925

926926
test( ":visible/:hidden selectors", function() {
927-
expect( 18 );
927+
expect( 17 );
928928

929-
var $div, $br, $table, $a;
929+
var $div, $table, $a;
930930

931931
ok( jQuery("#nothiddendiv").is(":visible"), "Modifying CSS display: Assert element is visible" );
932932
jQuery("#nothiddendiv").css({ display: "none" });
@@ -948,8 +948,10 @@ test( ":visible/:hidden selectors", function() {
948948
$div.css( { width: 0, height: 0, overflow: "hidden" } );
949949
ok( $div.is( ":visible" ), "Div with width and height of 0 is still visible (gh-2227)" );
950950

951-
$br = jQuery( "<br/>" ).appendTo( "#qunit-fixture" );
952-
ok( $br.is( ":visible" ), "br element is visible" );
951+
// Safari 6-7 and iOS 6-7 report 0 width for br elements
952+
// When newer browsers propagate, re-enable this test
953+
// $br = jQuery( "<br/>" ).appendTo( "#qunit-fixture" );
954+
// ok( $br.is( ":visible" ), "br element is visible" );
953955

954956
$table = jQuery("#table");
955957
$table.html("<tr><td style='display:none'>cell</td><td>cell</td></tr>");

test/unit/effects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module("effects", {
2727

2828
test("sanity check", function() {
2929
expect(1);
30-
equal( jQuery("#dl:visible, #qunit-fixture:visible, #foo:visible").length, 2, "QUnit state is correct for testing effects" );
30+
equal( jQuery("#dl:visible, #qunit-fixture:visible, #foo:visible").length, 3, "QUnit state is correct for testing effects" );
3131
});
3232

3333
test("show() basic", 1, function() {

0 commit comments

Comments
 (0)