From 45e13ed208b3533e91d008789d61e5138501428a Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 29 Jul 2014 10:40:02 -0400 Subject: Selectmenu: Properly set width for button Fixes #10145 Closes gh-1296 --- tests/unit/selectmenu/selectmenu_options.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests/unit/selectmenu') diff --git a/tests/unit/selectmenu/selectmenu_options.js b/tests/unit/selectmenu/selectmenu_options.js index 25448fd40..ae847f5e1 100644 --- a/tests/unit/selectmenu/selectmenu_options.js +++ b/tests/unit/selectmenu/selectmenu_options.js @@ -86,8 +86,8 @@ test( "CSS styles", function() { }); -test( "Width", function() { - expect( 8 ); +test( "width", function() { + expect( 9 ); var button, menu, element = $( "#speed" ); @@ -124,6 +124,14 @@ test( "Width", function() { equal( button.outerWidth(), element.outerWidth(), "button width with long option" ); element.selectmenu( "open" ); ok( menu.outerWidth() >= element.outerWidth(), "menu width with long option" ); + + element.parent().outerWidth( 300 ); + element + .selectmenu( "destroy" ) + .css( "width", "100%" ) + .selectmenu(); + button = element.selectmenu( "widget" ); + equal( button.outerWidth(), 300, "button width fills container" ); }); })( jQuery ); -- cgit v1.2.3