aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-05-16 08:36:55 +0200
committerGitHub <noreply@github.com>2020-05-16 08:36:55 +0200
commitf4ef03e57edd7e51cb134e902679c7bddc3daaee (patch)
tree9b58bc5746bb4b6e173337b71c86be2cabd31ea6 /tests
parentb36d54256968b028a9c324eba6d88754561d5ec4 (diff)
downloadjquery-ui-f4ef03e57edd7e51cb134e902679c7bddc3daaee.tar.gz
jquery-ui-f4ef03e57edd7e51cb134e902679c7bddc3daaee.zip
All: Resolve most jQuery Migrate warnings
Closes gh-1919
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/button/core.js2
-rw-r--r--tests/unit/checkboxradio/core.js4
-rw-r--r--tests/unit/checkboxradio/events.js2
-rw-r--r--tests/unit/menu/core.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/button/core.js b/tests/unit/button/core.js
index 13bc94e33..98219c66c 100644
--- a/tests/unit/button/core.js
+++ b/tests/unit/button/core.js
@@ -12,7 +12,7 @@ QUnit.test( "Disabled button loses focus", function( assert ) {
assert.expect( 2 );
var element = $( "#button" ).button();
- element.focus();
+ element.trigger( "focus" );
setTimeout( function() {
assert.equal( element[ 0 ], $.ui.safeActiveElement( document ), "Button is focused" );
diff --git a/tests/unit/checkboxradio/core.js b/tests/unit/checkboxradio/core.js
index fe2774d02..39d8c6831 100644
--- a/tests/unit/checkboxradio/core.js
+++ b/tests/unit/checkboxradio/core.js
@@ -34,7 +34,7 @@ QUnit.test( "Ensure checked after single click on checkbox label button", functi
var ready = assert.async();
assert.expect( 2 );
- $( "#check2" ).checkboxradio().change( function() {
+ $( "#check2" ).checkboxradio().on( "change", function() {
var label = $( this ).checkboxradio( "widget" );
assert.ok( this.checked, "checked ok" );
@@ -59,7 +59,7 @@ QUnit.test( "Handle form association via form attribute", function( assert ) {
var radio2 = $( "#crazy-form-2" ).checkboxradio();
var radio2Label = radio2.checkboxradio( "widget" );
- radio2.change( function() {
+ radio2.on( "change", function() {
assert.ok( this.checked, "#2 checked" );
assert.ok( !radio1[ 0 ].checked, "#1 not checked" );
diff --git a/tests/unit/checkboxradio/events.js b/tests/unit/checkboxradio/events.js
index 9e391897f..96580c791 100644
--- a/tests/unit/checkboxradio/events.js
+++ b/tests/unit/checkboxradio/events.js
@@ -35,7 +35,7 @@ QUnit.test( "Checkbox shows focus when using keyboard navigation", function( ass
var check = $( "#check" ).checkboxradio(),
label = $( "label[for='check']" );
assert.lacksClasses( label, "ui-state-focus" );
- check.focus();
+ check.trigger( "focus" );
setTimeout( function() {
assert.hasClasses( label, "ui-state-focus" );
ready();
diff --git a/tests/unit/menu/core.js b/tests/unit/menu/core.js
index be68eddca..8380d66bd 100644
--- a/tests/unit/menu/core.js
+++ b/tests/unit/menu/core.js
@@ -96,7 +96,7 @@ QUnit.test( "active menu item styling", function( assert ) {
setTimeout( function() {
isActive( parentItem );
isActive( childItem );
- element.blur();
+ element.trigger( "blur" );
setTimeout( function() {
isInactive( parentItem );
isInactive( childItem );