aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDoug Neiner <doug@pixelgraphics.us>2011-05-12 01:51:05 -0400
committerDoug Neiner <doug@pixelgraphics.us>2011-05-12 01:51:05 -0400
commit50a4186ef949ecaf7ab4977048160820587218d2 (patch)
tree8af97084eeac69674e96e1b18dcd8245ccab5ca2 /tests
parentc89bbc1839ec7bcbb2834dc2a148bade2a538217 (diff)
downloadjquery-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.js14
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);