Autocomplete tests: Update tests now that generated menu doesn't have anchors in elements

This commit is contained in:
Kris Borchers 2013-10-05 22:19:57 -05:00
parent 31e705ab32
commit 9620812986
2 changed files with 2 additions and 3 deletions

View 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;

View 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" );