aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-11-12 10:28:55 -0500
committerScott González <scott.gonzalez@gmail.com>2010-11-12 10:28:55 -0500
commit5dad57e3c2001b6c644e3c39798198bc34fa1e5d (patch)
tree3d467ae02425add93383fa85dfe6a54681ce0db5 /tests
parentfce1f97f7677f29cc8ba7b146e67799027cf1995 (diff)
downloadjquery-ui-5dad57e3c2001b6c644e3c39798198bc34fa1e5d.tar.gz
jquery-ui-5dad57e3c2001b6c644e3c39798198bc34fa1e5d.zip
Buttonset: Added items option and removed visible filter for adding rounded corners. Fixes #6262 - buttonset not applying ui-corner to invisible elements.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/button/button_tickets.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js
index 46002bdea..5c5053ded 100644
--- a/tests/unit/button/button_tickets.js
+++ b/tests/unit/button/button_tickets.js
@@ -1,15 +1,23 @@
/*
* button_tickets.js
*/
-(function($) {
+(function( $ ) {
-module("button: tickets");
+module( "button: tickets" );
-test("#5946 - buttonset should ignore buttons that are not :visible", function() {
- $( "#radio01" ).next().wrap( "<div></div>" ).parent().hide();
- var set = $( "#radio0" ).buttonset();
- ok( set.find( "label:eq(0)" ).is( ".ui-button:not(.ui-corner-left)" ) );
+test( "#5946 - buttonset should ignore buttons that are not :visible", function() {
+ $( "#radio01" ).next().andSelf().hide();
+ var set = $( "#radio0" ).buttonset({ items: ":radio:visible" });
+ ok( set.find( "label:eq(0)" ).is( ":not(.ui-button):not(.ui-corner-left)" ) );
ok( set.find( "label:eq(1)" ).is( ".ui-button.ui-corner-left" ) );
});
-})(jQuery);
+test( "#6262 - buttonset not applying ui-corner to invisible elements", function() {
+ $( "#radio0" ).hide();
+ var set = $( "#radio0" ).buttonset();
+ ok( set.find( "label:eq(0)" ).is( ".ui-button.ui-corner-left" ) );
+ ok( set.find( "label:eq(1)" ).is( ".ui-button" ) );
+ ok( set.find( "label:eq(2)" ).is( ".ui-button.ui-corner-right" ) );
+});
+
+})( jQuery );