]> source.dussan.org Git - jquery.git/commitdiff
Build: fix broken assertions caused by QUnit update
authorOleg Gaidarenko <markelog@gmail.com>
Sat, 14 Feb 2015 23:22:09 +0000 (02:22 +0300)
committerOleg Gaidarenko <markelog@gmail.com>
Sat, 14 Feb 2015 23:24:13 +0000 (02:24 +0300)
QUnit update broke couple traversing and manipulation tests, since new qunit
added another form to the test-suite while some of
jQuery selectors weren't specific

(cherry-picked from 8b6aeae52d4c53a53468678ccd45e9dda9665004)
Ref db31206d36a3a75c011310e282e0fdc9a0f3d99d

test/unit/manipulation.js
test/unit/traversing.js

index d9e9e40b3cc85f59f3c7c7fd44aa1d428d7ebda5..8ce29b3a9f2fd5fd21a1ca2a4fed31947c1f3592 100644 (file)
@@ -210,23 +210,23 @@ function testAppend( valueObj ) {
        equal( result.text(), defaultText + "buga", "Check if text appending works" );
        equal( jQuery("#select3").append( valueObj("<option value='appendTest'>Append Test</option>") ).find("option:last-child").attr("value"), "appendTest", "Appending html options to select element" );
 
-       jQuery("form").append( valueObj("<input name='radiotest' type='radio' checked='checked' />") );
-       jQuery("form input[name=radiotest]").each(function() {
+       jQuery("#qunit-fixture form").append( valueObj("<input name='radiotest' type='radio' checked='checked' />") );
+       jQuery("#qunit-fixture form input[name=radiotest]").each(function() {
                ok( jQuery(this).is(":checked"), "Append checked radio" );
        }).remove();
 
-       jQuery("form").append( valueObj("<input name='radiotest2' type='radio' checked    =   'checked' />") );
-       jQuery("form input[name=radiotest2]").each(function() {
+       jQuery("#qunit-fixture form").append( valueObj("<input name='radiotest2' type='radio' checked    =   'checked' />") );
+       jQuery("#qunit-fixture form input[name=radiotest2]").each(function() {
                ok( jQuery(this).is(":checked"), "Append alternately formated checked radio" );
        }).remove();
 
-       jQuery("form").append( valueObj("<input name='radiotest3' type='radio' checked />") );
-       jQuery("form input[name=radiotest3]").each(function() {
+       jQuery("#qunit-fixture form").append( valueObj("<input name='radiotest3' type='radio' checked />") );
+       jQuery("#qunit-fixture form input[name=radiotest3]").each(function() {
                ok( jQuery(this).is(":checked"), "Append HTML5-formated checked radio" );
        }).remove();
 
-       jQuery("form").append( valueObj("<input type='radio' checked='checked' name='radiotest4' />") );
-       jQuery("form input[name=radiotest4]").each(function() {
+       jQuery("#qunit-fixture form").append( valueObj("<input type='radio' checked='checked' name='radiotest4' />") );
+       jQuery("#qunit-fixture form input[name=radiotest4]").each(function() {
                ok( jQuery(this).is(":checked"), "Append with name attribute after checked attribute" );
        }).remove();
 
index 55e89324ed1f23b1f54744c80235cbea72516d65..1be1992cdb2058ba6ca2aceba18e293075b3b7fd 100644 (file)
@@ -122,7 +122,7 @@ test("is(jQuery)", function() {
        ok( !jQuery("#radio1").is( jQuery("input:checked") ), "Check for pseudoclass: Expected not checked" );
 
        // Some raw elements
-       ok( jQuery("#form").is( jQuery("form")[0] ), "Check for element: A form is a form" );
+       ok( jQuery("#form").is( jQuery("#qunit-fixture form")[0] ), "Check for element: A form is a form" );
        ok( !jQuery("#form").is( jQuery("div")[0] ), "Check for element: A form is not a div" );
        ok( jQuery("#mark").is( jQuery(".blog")[0] ), "Check for class: Expected class 'blog'" );
        ok( !jQuery("#mark").is( jQuery(".link")[0] ), "Check for class: Did not expect class 'link'" );