]> source.dussan.org Git - jquery-ui.git/commitdiff
Button Tests: move aria-pressed test to correct module
authorMike Sherov <mike.sherov@gmail.com>
Tue, 27 Nov 2012 01:24:31 +0000 (20:24 -0500)
committerMike Sherov <mike.sherov@gmail.com>
Tue, 27 Nov 2012 01:24:31 +0000 (20:24 -0500)
tests/unit/button/button_core.js
tests/unit/button/button_events.js

index f3c50d840909056e3ea8609e9b31757040f45098..fb03bb8a06a0682fc95172d67969dfa3e5f7dca4 100644 (file)
@@ -88,4 +88,15 @@ test("buttonset (rtl)", function() {
        ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
 });
 
+test( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
+       expect( 3 );
+
+       $("#check2").button().change( function() {
+               var lbl = $( this ).button("widget");
+               ok( this.checked, "checked ok" );
+               ok( lbl.attr("aria-pressed") === "true", "aria ok" );
+               ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
+       }).button("widget").simulate("click");
+});
+
 })(jQuery);
index b808b59b78027c8a9ff45db9a04cf68254677742..7b79c41ea21b866185d2e07f4f5905ecdde7fd25 100644 (file)
@@ -23,15 +23,4 @@ test( "when button loses focus, ensure active state is removed (#8559)", functio
        }).focus().simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } ).simulate( "keypress", { keyCode: $.ui.keyCode.ENTER } );
 });
 
-test( "ensure checked and aria after single click on checkbox label button", function() {
-       expect( 3 );
-
-       $("#check2").button().change( function() {
-               var lbl = $( this ).button("widget");
-               ok( this.checked, "checked ok" );
-               ok( lbl.attr("aria-pressed") === "true", "aria ok" );
-               ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
-       }).button("widget").simulate("click");
-});
-
 })(jQuery);