Skip to content

Commit f81f0ca

Browse files
committed
Checkboxradio: Fixup
1 parent bba1953 commit f81f0ca

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

tests/unit/checkboxradio/checkboxradio_core.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test("Checkbox", function() {
1111
var input = $("#check"),
1212
label = $("label[for=check]");
1313
ok( input.is( ":visible" ) );
14-
ok( !label.hasClass(".ui-button)") );
14+
ok( !label.hasClass("ui-button") );
1515
input.checkboxradio();
1616
equal( input.is( ".ui-helper-hidden-accessible.ui-checkboxradio" ), true,
1717
"Input has proper classes" );
@@ -31,9 +31,9 @@ test("Radios", function() {
3131
});
3232

3333
function assert(noForm, form1, form2) {
34-
ok( $("#radio0 .ui-button" + noForm).is(".ui-state-active") );
35-
ok( $("#radio1 .ui-button" + form1).is(".ui-state-active") );
36-
ok( $("#radio2 .ui-button" + form2).is(".ui-state-active") );
34+
ok( $( "#radio0 .ui-button" + noForm ).is( ".ui-state-active" ) );
35+
ok( $( "#radio1 .ui-button" + form1 ).is( ".ui-state-active" ) );
36+
ok( $( "#radio2 .ui-button" + form2 ).is( ".ui-state-active" ) );
3737
}
3838

3939
test("radio groups", function() {
@@ -93,7 +93,7 @@ if ( !$.ui.ie || ( document.documentMode && document.documentMode > 8 ) ) {
9393
});
9494
}
9595
test( "Checkbox creation that requires a matching finds label in all cases", function() {
96-
expect( 6 );
96+
expect( 7 );
9797
var group = $( "<span><label for='t7092a'></label><input type='checkbox' id='t7092a'></span>" );
9898
group.find( "input[type=checkbox]" ).checkboxradio();
9999
ok( group.find( "label" ).is( ".ui-button" ) );
@@ -117,6 +117,10 @@ test( "Checkbox creation that requires a matching finds label in all cases", fun
117117
group = $( "<span><label><input type='checkbox' id='t7092f'></label></span>" );
118118
group.find( "input[type=checkbox]" ).checkboxradio();
119119
ok( group.find( "label" ).is( ".ui-button" ) );
120+
121+
var group = $( "<span><input type='checkbox' id='check:7534'><label for='check:7534'>Label</label></span>" );
122+
group.find( "input" ).checkboxradio();
123+
ok( group.find( "label" ).is( ".ui-button" ), "Found an label with id containing a :" );
120124
});
121125

122126
asyncTest( "Resetting a button's form should refresh the visual state of the button widget to match.", function() {
@@ -136,12 +140,6 @@ asyncTest( "Resetting a button's form should refresh the visual state of the but
136140
start();
137141
}, 1 );
138142
});
139-
test( "Checkbox label selector works for ids with \":\"", function() {
140-
expect( 1 );
141-
var group = $( "<span><input type='checkbox' id='check:7534'><label for='check:7534'>Label</label></span>" );
142-
group.find( "input" ).checkboxradio();
143-
ok( group.find( "label" ).is( ".ui-button" ), "Found an id with a :" );
144-
});
145143

146144
test( "Calling checkboxradio on an unsupported element throws an error", function() {
147145
expect( 1 );

0 commit comments

Comments
 (0)