mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Autocomplete tests: Update tests now that generated menu doesn't have anchors in elements
This commit is contained in:
parent
31e705ab32
commit
9620812986
@ -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;
|
||||
|
@ -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" );
|
||||
|
Loading…
Reference in New Issue
Block a user