Skip to content

Commit 7a14f2e

Browse files
gseguinscottjehl
authored andcommitted
Fixed checkbox/radio unit tests to match new active classes
1 parent 9f07a1c commit 7a14f2e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/unit/checkboxradio/checkboxradio_core.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
ok(!input.attr("checked"), "not checked before click");
1616
button.trigger("click");
1717
ok(input.attr("checked"), "checked after click");
18-
ok(button.hasClass("ui-btn-active"), "active styles after click");
18+
ok(button.hasClass("ui-checkbox-on"), "active styles after click");
1919
button.trigger("click");
2020

2121
input.checkboxradio("disable");
@@ -24,7 +24,7 @@
2424
ok(!input.attr("checked"), "not checked before click");
2525
button.trigger("click");
2626
ok(!input.attr("checked"), "not checked after click");
27-
ok(!button.hasClass("ui-btn-active"), "no active styles after click");
27+
ok(!button.hasClass("ui-checkbox-on"), "no active styles after click");
2828
});
2929

3030
asyncTest( "change events fired on checkbox for both check and uncheck", function(){
@@ -52,7 +52,7 @@
5252
asyncTest( "radio button labels should update the active button class to last clicked and clear checked", function(){
5353
var $radioBtns = $('#radio-active-btn-test input'),
5454
singleActiveAndChecked = function(){
55-
same($("#radio-active-btn-test .ui-btn-active").length, 1, "there should be only one active button");
55+
same($("#radio-active-btn-test .ui-radio-on").length, 1, "there should be only one active button");
5656
same($("#radio-active-btn-test :checked").length, 1, "there should be only one checked");
5757
};
5858

@@ -63,11 +63,11 @@
6363

6464
function(){
6565
ok($radioBtns.last().attr('checked'));
66-
ok($radioBtns.last().siblings('label').hasClass('ui-btn-active'),
66+
ok($radioBtns.last().siblings('label').hasClass('ui-radio-on'),
6767
"last input label is an active button");
6868

6969
ok(!$radioBtns.first().attr('checked'));
70-
ok(!$radioBtns.first().siblings('label').hasClass('ui-btn-active'),
70+
ok(!$radioBtns.first().siblings('label').hasClass('ui-radio-on'),
7171
"first input label is not active");
7272

7373
singleActiveAndChecked();
@@ -77,11 +77,11 @@
7777

7878
function(){
7979
ok($radioBtns.first().attr('checked'));
80-
ok($radioBtns.first().siblings('label').hasClass('ui-btn-active'),
80+
ok($radioBtns.first().siblings('label').hasClass('ui-radio-on'),
8181
"first input label is an active button");
8282

8383
ok(!$radioBtns.last().attr('checked'));
84-
ok(!$radioBtns.last().siblings('label').hasClass('ui-btn-active'),
84+
ok(!$radioBtns.last().siblings('label').hasClass('ui-radio-on'),
8585
"last input label is not active");
8686

8787
singleActiveAndChecked();

0 commit comments

Comments
 (0)