Skip to content

Commit 22bd9fc

Browse files
committed
Button Tests: move aria-pressed test to correct module
1 parent caacf8f commit 22bd9fc

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tests/unit/button/button_core.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,15 @@ test("buttonset (rtl)", function() {
8888
ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
8989
});
9090

91+
test( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
92+
expect( 3 );
93+
94+
$("#check2").button().change( function() {
95+
var lbl = $( this ).button("widget");
96+
ok( this.checked, "checked ok" );
97+
ok( lbl.attr("aria-pressed") === "true", "aria ok" );
98+
ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
99+
}).button("widget").simulate("click");
100+
});
101+
91102
})(jQuery);

tests/unit/button/button_events.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,4 @@ test( "when button loses focus, ensure active state is removed (#8559)", functio
2323
}).focus().simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } ).simulate( "keypress", { keyCode: $.ui.keyCode.ENTER } );
2424
});
2525

26-
test( "ensure checked and aria after single click on checkbox label button", function() {
27-
expect( 3 );
28-
29-
$("#check2").button().change( function() {
30-
var lbl = $( this ).button("widget");
31-
ok( this.checked, "checked ok" );
32-
ok( lbl.attr("aria-pressed") === "true", "aria ok" );
33-
ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
34-
}).button("widget").simulate("click");
35-
});
36-
3726
})(jQuery);

0 commit comments

Comments
 (0)