Selectmenu tests: switch from a to button element

This commit is contained in:
Felix Nagel 2013-03-07 19:15:46 +01:00
parent 8787cb0456
commit 890881d2f8
2 changed files with 5 additions and 5 deletions

View File

@ -19,11 +19,11 @@ test( "change", function () {
}
});
var button = this.element.selectmenu( "widget" ).parent(),
var button = this.element.selectmenu( "widget" ),
menu = this.element.selectmenu( "menuWidget" ).parent(),
value = this.element.find( "option" ).first().text();
button.find( "a" ).simulate( "focus" ).simulate( "click" );
button.simulate( "focus" ).simulate( "click" );
menu.find( "a" ).first().simulate( "mouseover" ).trigger( "click" );
});
@ -100,10 +100,10 @@ test( "select", function () {
}
});
var button = this.element.selectmenu( "widget" ).parent(),
var button = this.element.selectmenu( "widget" ),
menu = this.element.selectmenu( "menuWidget" ).parent();
button.find( "a" ).simulate( "focus" ).simulate( "click" );
button.simulate( "focus" ).simulate( "click" );
menu.find( "a" ).first().simulate( "mouseover" ).trigger( "click" );
});

View File

@ -154,7 +154,7 @@ test( "widget", function() {
element.selectmenu( "refresh" );
equal( widgetElement.length, 1, "widget: one element" );
ok( widgetElement.is( "a.ui-button" ), "widget: button element" );
ok( widgetElement.is( "button.ui-button" ), "widget: button element" );
equal( menuWidgetElement.length, 1, "menuWidget: one element" );
ok( menuWidgetElement.is( "ul.ui-menu" ), "menuWidget: menu element" );