jquery-ui/tests/unit/button/events.js
Alexander Schmitz 02033262ee Button: Initial commit of button re-factor
Move to using element stats rather then js class states remove
ui-button-text spans.
Removed button set
2015-10-07 10:57:59 -04:00

21 lines
426 B
JavaScript

define( [
"jquery",
"ui/widgets/button"
], function( $ ) {
module( "Button: events" );
asyncTest( "Anchor recieves click event when spacebar is pressed", function() {
expect( 1 );
var element = $( "#anchor-button" ).button();
element.on( "click", function() {
ok( true, "click occcured as a result of spacebar" );
start();
} );
element.trigger( $.Event( "keyup", { keyCode: $.ui.keyCode.SPACE } ) );
} );
} );