diff options
author | Doug Neiner <doug@pixelgraphics.us> | 2011-05-12 01:51:05 -0400 |
---|---|---|
committer | Doug Neiner <doug@pixelgraphics.us> | 2011-05-12 01:51:05 -0400 |
commit | 50a4186ef949ecaf7ab4977048160820587218d2 (patch) | |
tree | 8af97084eeac69674e96e1b18dcd8245ccab5ca2 /tests | |
parent | c89bbc1839ec7bcbb2834dc2a148bade2a538217 (diff) | |
download | jquery-ui-50a4186ef949ecaf7ab4977048160820587218d2.tar.gz jquery-ui-50a4186ef949ecaf7ab4977048160820587218d2.zip |
Button: Added rtl detection so corner classes would properly be applied to buttonsets. Fixed #6796. jQueryui - buttonset on rtl
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/button/button_core.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/button/button_core.js b/tests/unit/button/button_core.js index 5b30aa860..692c40320 100644 --- a/tests/unit/button/button_core.js +++ b/tests/unit/button/button_core.js @@ -67,4 +67,18 @@ test("buttonset", function() { ok( set.children("label:eq(2)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") ); }); +test("buttonset (rtl)", function() { + var parent = $("#radio1").parent(); + // Set to rtl + parent.attr("dir", "rtl"); + + var set = $("#radio1").buttonset(); + ok( set.is(".ui-buttonset") ); + same( set.children(".ui-button").length, 3 ); + same( set.children("input:radio.ui-helper-hidden-accessible").length, 3 ); + ok( set.children("label:eq(0)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") ); + ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") ); + ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") ); +}); + })(jQuery); |