diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2014-06-22 21:00:03 -0400 |
---|---|---|
committer | TJ VanToll <tj.vantoll@gmail.com> | 2014-06-25 12:16:29 -0400 |
commit | c29b4434b6c09c3ddee705be46e2b00462499880 (patch) | |
tree | 4bc207867e02b60eaac0b9cc3921353299034a04 /tests/unit/selectmenu | |
parent | a0fea7d849a2d0a949cfde8ea1c2edbf2a94d963 (diff) | |
download | jquery-ui-c29b4434b6c09c3ddee705be46e2b00462499880.tar.gz jquery-ui-c29b4434b6c09c3ddee705be46e2b00462499880.zip |
Tests: Use closeEnough() to account for rounding differences
Selectmenu's test suite broke with b0e8380, which changed the padding
used by the menu widget. Selectmenu conditionally adds pixels to the
menu's width, and using closeEnough() accounts for that and the
rounding differences across browsers.
Closes gh-1275
Diffstat (limited to 'tests/unit/selectmenu')
-rw-r--r-- | tests/unit/selectmenu/selectmenu_options.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/selectmenu/selectmenu_options.js b/tests/unit/selectmenu/selectmenu_options.js index 32c875403..25448fd40 100644 --- a/tests/unit/selectmenu/selectmenu_options.js +++ b/tests/unit/selectmenu/selectmenu_options.js @@ -98,7 +98,7 @@ test( "Width", function() { equal( button.outerWidth(), element.outerWidth(), "button width auto" ); element.selectmenu( "open" ); - equal( menu.outerWidth(), element.outerWidth(), "menu width auto" ); + closeEnough( menu.outerWidth(), element.outerWidth(), 2, "menu width auto" ); element.outerWidth( 100 ); element.selectmenu( "refresh" ); |