From 3909e6d89e01e4cd8777377c63037896bb95aa2f Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Fri, 25 Nov 2011 21:18:19 +0100 Subject: new jq layout --- .../tests/unit/button/button_tickets.js | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/main/webapp/jquery-ui-1.9pre/tests/unit/button/button_tickets.js (limited to 'src/main/webapp/jquery-ui-1.9pre/tests/unit/button/button_tickets.js') diff --git a/src/main/webapp/jquery-ui-1.9pre/tests/unit/button/button_tickets.js b/src/main/webapp/jquery-ui-1.9pre/tests/unit/button/button_tickets.js new file mode 100644 index 0000000..624d167 --- /dev/null +++ b/src/main/webapp/jquery-ui-1.9pre/tests/unit/button/button_tickets.js @@ -0,0 +1,59 @@ +/* + * button_tickets.js + */ +(function( $ ) { + +module( "button: tickets" ); + +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" ) ); +}); + +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" ) ); +}); + +test( "#6711 Checkbox/Radiobutton do not Show Focused State when using Keyboard Navigation", function() { + var check = $( "#check" ).button(), + label = $( "label[for='check']" ); + ok( !label.is( ".ui-state-focus" ) ); + check.focus(); + ok( label.is( ".ui-state-focus" ) ); +}); + +test( "#7092 - button creation that requires a matching label does not find label in all cases", function() { + var group = $( "" ); + group.find( "input:checkbox" ).button(); + ok( group.find( "label" ).is( ".ui-button" ) ); + + group = $( "" ); + group.filter( "input:checkbox" ).button(); + ok( group.filter( "label" ).is( ".ui-button" ) ); + + group = $( "" ); + group.find( "input:checkbox" ).button(); + ok( group.filter( "label" ).is( ".ui-button" ) ); + + group = $( "" ); + group.find( "input:checkbox" ).button(); + ok( group.find( "label" ).is( ".ui-button" ) ); + + group = $( "" ); + group.filter( "input:checkbox" ).button(); + ok( group.find( "label" ).is( ".ui-button" ) ); +}); + +test( "#7534 - Button label selector works for ids with \":\"", function() { + var group = $( "" ); + group.find( "input" ).button(); + ok( group.find( "label" ).is( ".ui-button" ), "Found an id with a :" ); +}); + +})( jQuery ); -- cgit v1.1