diff options
Diffstat (limited to 'tests/unit/autocomplete')
-rw-r--r-- | tests/unit/autocomplete/all.html | 2 | ||||
-rw-r--r-- | tests/unit/autocomplete/autocomplete_events.js | 29 |
2 files changed, 16 insertions, 15 deletions
diff --git a/tests/unit/autocomplete/all.html b/tests/unit/autocomplete/all.html index a136d8c25..c644e2728 100644 --- a/tests/unit/autocomplete/all.html +++ b/tests/unit/autocomplete/all.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title>jQuery UI Autocomplete Test Suite</title> - <script src="../../../jquery-1.7.js"></script> + <script src="../../../jquery-1.7.1.js"></script> <link rel="stylesheet" href="../../../external/qunit.css"> <link rel="stylesheet" href="../subsuiteRunner.css"> diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js index 286d902f1..7b51ec4c0 100644 --- a/tests/unit/autocomplete/autocomplete_events.js +++ b/tests/unit/autocomplete/autocomplete_events.js @@ -157,22 +157,23 @@ asyncTest( "cancel select", function() { }, 50 ); }); -/* TODO previous fix broke more than it fixed, disabling this for now - messed up regular menu select event -test("blur without selection", function() { - expect(1); - var ac = $("#autocomplete").autocomplete({ +asyncTest( "blur during remote search", function() { + expect( 1 ); + var ac = $( "#autocomplete" ).autocomplete({ delay: 0, - source: data + source: function( request, response ) { + ok( true, "trigger request" ); + ac.simulate( "blur" ); + setTimeout(function() { + response([ "result" ]); + start(); + }, 100 ); + }, + open: function() { + ok( false, "opened after a blur" ); + } }); - stop(); - ac.val("j").keydown(); - setTimeout(function() { - $( ".ui-menu-item" ).first().simulate("mouseover"); - ac.simulate("keydown", { keyCode: $.ui.keyCode.TAB }); - deepEqual( ac.val(), "j" ); - start(); - }, 50); + ac.val( "ro" ).keydown(); }); -*/ }( jQuery ) ); |