From 890881d2f8af5eb6df66e61a95188a5a43997310 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Thu, 7 Mar 2013 19:15:46 +0100 Subject: [PATCH] Selectmenu tests: switch from a to button element --- tests/unit/selectmenu/selectmenu_events.js | 8 ++++---- tests/unit/selectmenu/selectmenu_methods.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/selectmenu/selectmenu_events.js b/tests/unit/selectmenu/selectmenu_events.js index ea9f8d0fb..f33e66b25 100644 --- a/tests/unit/selectmenu/selectmenu_events.js +++ b/tests/unit/selectmenu/selectmenu_events.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" ); }); diff --git a/tests/unit/selectmenu/selectmenu_methods.js b/tests/unit/selectmenu/selectmenu_methods.js index 56fb03e73..a5dfd5a95 100644 --- a/tests/unit/selectmenu/selectmenu_methods.js +++ b/tests/unit/selectmenu/selectmenu_methods.js @@ -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" );