From: Dave Methvin Date: Thu, 13 Oct 2011 17:18:30 +0000 (-0400) Subject: Autocomplete tests: Fix #7788, incorrect selector in autoFocus test. X-Git-Tag: 1.9m7~193^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9b3ada43d3a41f4cd5ae9e62d1131170d9686af6;p=jquery-ui.git Autocomplete tests: Fix #7788, incorrect selector in autoFocus test. jQuery 1.7 fixed a bug with positional selectors that exposed the incorrect use of `.children()` here. --- diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index 8d11aa399..114e9a42b 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -34,7 +34,7 @@ function autoFocusTest( afValue, focusedLength ) { delay: 0, source: data, open: function( event, ui ) { - equal( element.autocomplete( "widget" ).children( ".ui-menu-item:first .ui-state-focus" ).length, + equal( element.autocomplete( "widget" ).children( ".ui-menu-item:first" ).find( ".ui-state-focus" ).length, focusedLength, "first item is " + (afValue ? "" : "not") + " auto focused" ); start(); }