aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/autocomplete
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/autocomplete')
-rw-r--r--tests/unit/autocomplete/autocomplete_core.js7
-rw-r--r--tests/unit/autocomplete/autocomplete_events.js6
-rw-r--r--tests/unit/autocomplete/autocomplete_options.js2
3 files changed, 7 insertions, 8 deletions
diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js
index f0ad36a57..845a3b19d 100644
--- a/tests/unit/autocomplete/autocomplete_core.js
+++ b/tests/unit/autocomplete/autocomplete_core.js
@@ -99,7 +99,7 @@ test( "allow form submit on enter when menu is not active", function() {
delay: 0,
minLength: 0
});
- element.data( "autocomplete" )._move = function() {
+ element.data( "ui-autocomplete" )._move = function() {
didMove = true;
};
element.simulate( "keydown", { keyCode: ( isKeyUp ? $.ui.keyCode.UP : $.ui.keyCode.DOWN ) } );
@@ -109,13 +109,12 @@ test( "allow form submit on enter when menu is not active", function() {
function arrowsMoveFocus( id, isKeyUp ) {
expect( 1 );
- var didMove = false,
- element = $( id ).autocomplete({
+ var element = $( id ).autocomplete({
source: [ "a" ],
delay: 0,
minLength: 0
});
- element.data( "autocomplete" )._move = function() {
+ element.data( "ui-autocomplete" )._move = function() {
ok( true, "repsond to arrow" );
};
element.autocomplete( "search" );
diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js
index 082263a35..fb1cf73a6 100644
--- a/tests/unit/autocomplete/autocomplete_events.js
+++ b/tests/unit/autocomplete/autocomplete_events.js
@@ -39,7 +39,7 @@ $.each([
], "response ui.content" );
ui.content.splice( 0, 1 );
},
- open: function( event ) {
+ open: function() {
ok( menu.is( ":visible" ), "menu open on open" );
},
focus: function( event, ui ) {
@@ -127,7 +127,7 @@ asyncTest( "cancel focus", function() {
element = $( "#autocomplete" ).autocomplete({
delay: 0,
source: data,
- focus: function( event, ui ) {
+ focus: function() {
$( this ).val( customVal );
return false;
}
@@ -146,7 +146,7 @@ asyncTest( "cancel select", function() {
element = $( "#autocomplete" ).autocomplete({
delay: 0,
source: data,
- select: function( event, ui ) {
+ select: function() {
$( this ).val( customVal );
return false;
}
diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js
index 1ab40f36c..8331c53d5 100644
--- a/tests/unit/autocomplete/autocomplete_options.js
+++ b/tests/unit/autocomplete/autocomplete_options.js
@@ -33,7 +33,7 @@ function autoFocusTest( afValue, focusedLength ) {
autoFocus: afValue,
delay: 0,
source: data,
- open: function( event, ui ) {
+ open: function() {
equal( element.autocomplete( "widget" ).children( ".ui-menu-item:first" ).find( ".ui-state-focus" ).length,
focusedLength, "first item is " + (afValue ? "" : "not") + " auto focused" );
start();