11define ( [
2+ "qunit" ,
23 "jquery" ,
34 "ui/widgets/controlgroup" ,
45 "ui/widgets/checkboxradio" ,
56 "ui/widgets/selectmenu" ,
67 "ui/widgets/button"
7- ] , function ( $ ) {
8+ ] , function ( QUnit , $ ) {
89
9- module ( "Controlgroup: options" ) ;
10+ QUnit . module ( "Controlgroup: options" ) ;
1011
11- test ( "disabled" , function ( assert ) {
12- expect ( 4 ) ;
12+ QUnit . test ( "disabled" , function ( assert ) {
13+ assert . expect ( 4 ) ;
1314 var element = $ ( ".controlgroup" ) . controlgroup ( ) . controlgroup ( "option" , "disabled" , true ) ;
1415 assert . lacksClasses ( element , "ui-state-disabled" ) ;
15- equal ( element . find ( ".ui-state-disabled" ) . length , 6 , "Child widgets are disabled" ) ;
16+ assert . equal ( element . find ( ".ui-state-disabled" ) . length , 6 , "Child widgets are disabled" ) ;
1617
1718 element . controlgroup ( "option" , "disabled" , false ) ;
1819 assert . lacksClasses ( element , "ui-state-disabled" ) ;
19- strictEqual ( element . find ( ".ui-state-disabled" ) . length , 0 , "Child widgets are not disabled" ) ;
20+ assert . strictEqual ( element . find ( ".ui-state-disabled" ) . length , 0 , "Child widgets are not disabled" ) ;
2021
2122} ) ;
2223
23- test ( "items - null" , function ( ) {
24- expect ( 2 ) ;
24+ QUnit . test ( "items - null" , function ( assert ) {
25+ assert . expect ( 2 ) ;
2526 var element = $ ( ".controlgroup" ) . controlgroup ( {
2627 items : {
2728 "button" : null ,
@@ -30,24 +31,24 @@ test( "items - null", function() {
3031 }
3132 } ) ;
3233
33- strictEqual ( element . children ( ".ui-button" ) . length , 0 ,
34+ assert . strictEqual ( element . children ( ".ui-button" ) . length , 0 ,
3435 "Child widgets are not called when selector is null" ) ;
3536
3637 element . controlgroup ( "option" , "items" , {
3738 "button" : "button"
3839 } ) ;
39- strictEqual ( element . children ( ".ui-button" ) . length , 2 ,
40+ assert . strictEqual ( element . children ( ".ui-button" ) . length , 2 ,
4041 "Correct child widgets are called when selector is updated" ) ;
4142} ) ;
4243
43- test ( "items: custom selector" , function ( ) {
44- expect ( 1 ) ;
44+ QUnit . test ( "items: custom selector" , function ( assert ) {
45+ assert . expect ( 1 ) ;
4546 var element = $ ( ".controlgroup" ) . controlgroup ( {
4647 items : {
4748 "button" : ".button"
4849 }
4950 } ) ;
50- strictEqual ( element . children ( ".ui-button" ) . length , 4 ,
51+ assert . strictEqual ( element . children ( ".ui-button" ) . length , 4 ,
5152 "Correct child widgets are called when custom selector used" ) ;
5253} ) ;
5354
@@ -60,22 +61,22 @@ $.widget( "ui.test", {
6061 refresh : $ . noop
6162} ) ;
6263
63- test ( "items: custom widget" , function ( ) {
64- expect ( 2 ) ;
64+ QUnit . test ( "items: custom widget" , function ( assert ) {
65+ assert . expect ( 2 ) ;
6566 var element = $ ( ".controlgroup" ) . controlgroup ( {
6667 items : {
6768 "test" : ".test"
6869 }
6970 } ) ;
7071
71- strictEqual ( element . children ( ".ui-button" ) . length , 7 ,
72+ assert . strictEqual ( element . children ( ".ui-button" ) . length , 7 ,
7273 "Correct child widgets are called when custom selector used" ) ;
73- strictEqual ( element . children ( ".ui-test" ) . length , 1 ,
74+ assert . strictEqual ( element . children ( ".ui-test" ) . length , 1 ,
7475 "Custom widget called" ) ;
7576} ) ;
7677
77- test ( "onlyVisible" , function ( assert ) {
78- expect ( 4 ) ;
78+ QUnit . test ( "onlyVisible" , function ( assert ) {
79+ assert . expect ( 4 ) ;
7980 var element = $ ( ".controlgroup" ) . controlgroup ( {
8081 onlyVisible : false
8182 } ) ,
@@ -91,8 +92,8 @@ test( "onlyVisible", function( assert ) {
9192 "onlyVisible: true: First button is hidden second button get corner class" ) ;
9293} ) ;
9394
94- test ( "direction" , function ( assert ) {
95- expect ( 6 ) ;
95+ QUnit . test ( "direction" , function ( assert ) {
96+ assert . expect ( 6 ) ;
9697 var element = $ ( ".controlgroup" ) . controlgroup ( ) ,
9798 buttons = element . children ( ".ui-button" ) . filter ( ":visible" ) ;
9899
0 commit comments