Skip to content

Commit 98c77c1

Browse files
committed
Build: fix broken assertions caused by QUnit update
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 8b6aeae) Ref db31206
1 parent fd80f59 commit 98c77c1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/unit/manipulation.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,23 +210,23 @@ function testAppend( valueObj ) {
210210
equal( result.text(), defaultText + "buga", "Check if text appending works" );
211211
equal( jQuery("#select3").append( valueObj("<option value='appendTest'>Append Test</option>") ).find("option:last-child").attr("value"), "appendTest", "Appending html options to select element" );
212212

213-
jQuery("form").append( valueObj("<input name='radiotest' type='radio' checked='checked' />") );
214-
jQuery("form input[name=radiotest]").each(function() {
213+
jQuery("#qunit-fixture form").append( valueObj("<input name='radiotest' type='radio' checked='checked' />") );
214+
jQuery("#qunit-fixture form input[name=radiotest]").each(function() {
215215
ok( jQuery(this).is(":checked"), "Append checked radio" );
216216
}).remove();
217217

218-
jQuery("form").append( valueObj("<input name='radiotest2' type='radio' checked = 'checked' />") );
219-
jQuery("form input[name=radiotest2]").each(function() {
218+
jQuery("#qunit-fixture form").append( valueObj("<input name='radiotest2' type='radio' checked = 'checked' />") );
219+
jQuery("#qunit-fixture form input[name=radiotest2]").each(function() {
220220
ok( jQuery(this).is(":checked"), "Append alternately formated checked radio" );
221221
}).remove();
222222

223-
jQuery("form").append( valueObj("<input name='radiotest3' type='radio' checked />") );
224-
jQuery("form input[name=radiotest3]").each(function() {
223+
jQuery("#qunit-fixture form").append( valueObj("<input name='radiotest3' type='radio' checked />") );
224+
jQuery("#qunit-fixture form input[name=radiotest3]").each(function() {
225225
ok( jQuery(this).is(":checked"), "Append HTML5-formated checked radio" );
226226
}).remove();
227227

228-
jQuery("form").append( valueObj("<input type='radio' checked='checked' name='radiotest4' />") );
229-
jQuery("form input[name=radiotest4]").each(function() {
228+
jQuery("#qunit-fixture form").append( valueObj("<input type='radio' checked='checked' name='radiotest4' />") );
229+
jQuery("#qunit-fixture form input[name=radiotest4]").each(function() {
230230
ok( jQuery(this).is(":checked"), "Append with name attribute after checked attribute" );
231231
}).remove();
232232

test/unit/traversing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ test("is(jQuery)", function() {
122122
ok( !jQuery("#radio1").is( jQuery("input:checked") ), "Check for pseudoclass: Expected not checked" );
123123

124124
// Some raw elements
125-
ok( jQuery("#form").is( jQuery("form")[0] ), "Check for element: A form is a form" );
125+
ok( jQuery("#form").is( jQuery("#qunit-fixture form")[0] ), "Check for element: A form is a form" );
126126
ok( !jQuery("#form").is( jQuery("div")[0] ), "Check for element: A form is not a div" );
127127
ok( jQuery("#mark").is( jQuery(".blog")[0] ), "Check for class: Expected class 'blog'" );
128128
ok( !jQuery("#mark").is( jQuery(".link")[0] ), "Check for class: Did not expect class 'link'" );

0 commit comments

Comments
 (0)