aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/button
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-05-13 21:54:37 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-05-20 14:27:55 -0400
commit12df1b7dad135aa57640be631277db3f7d75d672 (patch)
tree4eebd1f09cecf57ed2dbdf358e9d4ddaea680fdd /tests/unit/button
parent8b4ce807cd97e3cb953995934d6c4f614de9fa03 (diff)
downloadjquery-ui-12df1b7dad135aa57640be631277db3f7d75d672.tar.gz
jquery-ui-12df1b7dad135aa57640be631277db3f7d75d672.zip
Button: Remove core event/alias and deprecated module dependencies
Diffstat (limited to 'tests/unit/button')
-rw-r--r--tests/unit/button/core.js10
-rw-r--r--tests/unit/button/events.js8
-rw-r--r--tests/unit/button/options.js2
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/unit/button/core.js b/tests/unit/button/core.js
index 4bc8d9fe5..8539464ba 100644
--- a/tests/unit/button/core.js
+++ b/tests/unit/button/core.js
@@ -44,15 +44,15 @@ test("radio groups", function( assert ) {
assertClasses(":eq(0)", ":eq(1)", ":eq(2)");
// click outside of forms
- $("#radio0 .ui-button:eq(1)").click();
+ $("#radio0 .ui-button:eq(1)").trigger( "click" );
assertClasses(":eq(1)", ":eq(1)", ":eq(2)");
// click in first form
- $("#radio1 .ui-button:eq(0)").click();
+ $("#radio1 .ui-button:eq(0)").trigger( "click" );
assertClasses(":eq(1)", ":eq(0)", ":eq(2)");
// click in second form
- $("#radio2 .ui-button:eq(0)").click();
+ $("#radio2 .ui-button:eq(0)").trigger( "click" );
assertClasses(":eq(1)", ":eq(0)", ":eq(0)");
});
@@ -112,7 +112,7 @@ if ( !$.ui.ie || ( document.documentMode && document.documentMode > 8 ) ) {
asyncTest( "ensure checked and aria after single click on checkbox label button, see #5518", function( assert ) {
expect( 3 );
- $("#check2").button().change( function() {
+ $("#check2").button().on( "change", function() {
var lbl = $( this ).button("widget");
ok( this.checked, "checked ok" );
ok( lbl.attr("aria-pressed") === "true", "aria ok" );
@@ -200,7 +200,7 @@ asyncTest( "#6711 Checkbox/Radiobutton do not Show Focused State when using Keyb
var check = $( "#check" ).button(),
label = $( "label[for='check']" );
assert.lacksClasses( label, "ui-state-focus" );
- check.focus();
+ check.trigger( "focus" );
setTimeout(function() {
assert.hasClasses( label, "ui-state-focus" );
start();
diff --git a/tests/unit/button/events.js b/tests/unit/button/events.js
index ec930077c..63550e2f8 100644
--- a/tests/unit/button/events.js
+++ b/tests/unit/button/events.js
@@ -8,9 +8,9 @@ module("button: events");
test("buttonset works with single-quote named elements (#7505)", function() {
expect( 1 );
$("#radio3").buttonset();
- $("#radio33").click( function(){
+ $("#radio33").on( "click", function(){
ok( true, "button clicks work with single-quote named elements" );
- }).click();
+ }).trigger( "click" );
});
asyncTest( "when button loses focus, ensure active state is removed (#8559)", function( assert ) {
@@ -22,10 +22,10 @@ asyncTest( "when button loses focus, ensure active state is removed (#8559)", fu
element.one( "blur", function() {
assert.lacksClasses( element, "ui-state-active", "button loses active state appropriately" );
start();
- }).blur();
+ }).trigger( "blur" );
});
- element.focus();
+ element.trigger( "focus" );
setTimeout(function() {
element
.simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } )
diff --git a/tests/unit/button/options.js b/tests/unit/button/options.js
index 70470e671..23020fc10 100644
--- a/tests/unit/button/options.js
+++ b/tests/unit/button/options.js
@@ -146,7 +146,7 @@ test("icons", function() {
test( "#5295 - button does not remove hoverstate if disabled" , function( assert ) {
expect( 1 );
var btn = $("#button").button();
- btn.hover( function() {
+ btn.on( "hover", function() {
btn.button( "disable" );
});
btn.trigger( "mouseenter" );