]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete tests: Update tests now that generated menu doesn't have anchors in...
authorKris Borchers <kris.borchers@gmail.com>
Sun, 6 Oct 2013 03:19:57 +0000 (22:19 -0500)
committerKris Borchers <kris.borchers@gmail.com>
Sun, 6 Oct 2013 03:19:57 +0000 (22:19 -0500)
tests/unit/autocomplete/autocomplete_core.js
tests/unit/autocomplete/autocomplete_options.js

index 03ebdfec905d57ba13e0622e38ec15610470328e..a8b0a733049ac213bb4fbca8cb49ec0b6032b3f2 100644 (file)
@@ -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;
index d60faf47e83245b407f9e4bfde3cf6145994b160..e6f08785b6abe59c82d5f4973a09bcd983a26ab5 100644 (file)
@@ -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" );