From 9620812986a090668c44d48a7c85a46b580a89df Mon Sep 17 00:00:00 2001 From: Kris Borchers Date: Sat, 5 Oct 2013 22:19:57 -0500 Subject: [PATCH] Autocomplete tests: Update tests now that generated menu doesn't have anchors in elements --- tests/unit/autocomplete/autocomplete_core.js | 2 +- tests/unit/autocomplete/autocomplete_options.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js index 03ebdfec9..a8b0a7330 100644 --- a/tests/unit/autocomplete/autocomplete_core.js +++ b/tests/unit/autocomplete/autocomplete_core.js @@ -16,7 +16,7 @@ test( "prevent form submit on enter when menu is active", function() { event = $.Event( "keydown" ); event.keyCode = $.ui.keyCode.DOWN; element.trigger( event ); - deepEqual( menu.find( ".ui-menu-item:has(.ui-state-focus)" ).length, 1, "menu item is active" ); + equal( menu.find( ".ui-menu-item.ui-state-focus" ).length, 1, "menu item is active" ); event = $.Event( "keydown" ); event.keyCode = $.ui.keyCode.ENTER; diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index d60faf47e..e6f08785b 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -62,8 +62,7 @@ function autoFocusTest( afValue, focusedLength ) { open: function() { equal( element.autocomplete( "widget" ) - .children( ".ui-menu-item:first" ) - .find( ".ui-state-focus" ) + .children( ".ui-menu-item.ui-state-focus" ) .length, focusedLength, "first item is " + (afValue ? "" : "not") + " auto focused" ); -- 2.39.5