aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectmenu
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2014-07-29 10:40:02 -0400
committerScott González <scott.gonzalez@gmail.com>2014-07-29 13:17:30 -0400
commit45e13ed208b3533e91d008789d61e5138501428a (patch)
treed6aac009c75da5b1cffe2d9c30a2b3b2b9a671d4 /tests/unit/selectmenu
parentd1e327c189cb12661f53d6962ece07b31dec86cb (diff)
downloadjquery-ui-45e13ed208b3533e91d008789d61e5138501428a.tar.gz
jquery-ui-45e13ed208b3533e91d008789d61e5138501428a.zip
Selectmenu: Properly set width for button
Fixes #10145 Closes gh-1296
Diffstat (limited to 'tests/unit/selectmenu')
-rw-r--r--tests/unit/selectmenu/selectmenu_options.js12
1 files changed, 10 insertions, 2 deletions
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 );