Permalink
Browse files

Selectmenu tests: switch from a to button element

  • Loading branch information...
1 parent 8787cb0 commit 890881d2f8af5eb6df66e61a95188a5a43997310 @fnagel fnagel committed Mar 7, 2013
Showing with 5 additions and 5 deletions.
  1. +4 −4 tests/unit/selectmenu/selectmenu_events.js
  2. +1 −1 tests/unit/selectmenu/selectmenu_methods.js
@@ -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" );
});
@@ -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" );

0 comments on commit 890881d

Please sign in to comment.