diff --git a/tests/unit/controlgroup/common.js b/tests/unit/controlgroup/common.js index 1a62d971b..f04a018a8 100644 --- a/tests/unit/controlgroup/common.js +++ b/tests/unit/controlgroup/common.js @@ -3,7 +3,8 @@ define( [ "ui/widgets/controlgroup", "ui/widgets/checkboxradio", "ui/widgets/selectmenu", - "ui/widgets/button" + "ui/widgets/button", + "ui/widgets/spinner" ], function( common ) { common.testWidget( "controlgroup", { diff --git a/tests/unit/controlgroup/core.js b/tests/unit/controlgroup/core.js index 205633594..70d6267ad 100644 --- a/tests/unit/controlgroup/core.js +++ b/tests/unit/controlgroup/core.js @@ -4,7 +4,8 @@ define( [ "ui/widgets/controlgroup", "ui/widgets/checkboxradio", "ui/widgets/selectmenu", - "ui/widgets/button" + "ui/widgets/button", + "ui/widgets/spinner" ], function( QUnit, $ ) { QUnit.module( "Controlgroup: Core" ); @@ -75,11 +76,11 @@ QUnit.test( "selectmenu: controlgroupLabel", function( assert ) { } ); var assertSanatized = function( assert, initClasses, expectedClasses, message ) { - var selectmenu = $( "#select-sanatize" ).selectmenu({ + var selectmenu = $( "#select-sanatize" ).selectmenu( { classes: { "ui-selectmenu-button-open": initClasses } - }).selectmenu( "instance" ); + } ).selectmenu( "instance" ); var classes = { "ui-selectmenu-button-open": "ui-corner-top" }; @@ -87,7 +88,7 @@ var assertSanatized = function( assert, initClasses, expectedClasses, message ) assert.deepEqual( result, { "ui-selectmenu-button-open": expectedClasses + " ui-corner-top" }, message ); -} +}; QUnit.test( "_resolveClassesValues", function( assert ) { assert.expect( 6 ); diff --git a/tests/unit/controlgroup/methods.js b/tests/unit/controlgroup/methods.js index 9f1e4201e..a9d781f2e 100644 --- a/tests/unit/controlgroup/methods.js +++ b/tests/unit/controlgroup/methods.js @@ -4,7 +4,8 @@ define( [ "ui/widgets/controlgroup", "ui/widgets/checkboxradio", "ui/widgets/selectmenu", - "ui/widgets/button" + "ui/widgets/button", + "ui/widgets/spinner" ], function( QUnit, $ ) { QUnit.module( "Controlgroup: methods" ); @@ -13,6 +14,7 @@ QUnit.test( "destroy", function( assert ) { assert.expect( 1 ); assert.domEqual( ".controlgroup", function() { $( ".controlgroup" ).controlgroup().controlgroup( "destroy" ); + $( "#spinner" ).addClass( "ui-spinner-input" ); } ); } ); @@ -21,7 +23,7 @@ QUnit.test( "disable", function( assert ) { var element = $( ".controlgroup" ).controlgroup().controlgroup( "disable" ); assert.lacksClasses( element, "ui-state-disabled", "The widget does not get the disabled class, because we disable each child widget" ); - assert.strictEqual( element.find( ".ui-state-disabled" ).length, 6, + assert.strictEqual( element.find( ".ui-state-disabled" ).length, 9, "Child widgets are disabled" ); } ); @@ -37,7 +39,8 @@ QUnit.test( "enable", function( assert ) { var tests = { "checkboxradio": "", "selectmenu": "", - "button": "" + "button": "", + "spinner": "" }, orientations = { "horizontal": [ @@ -63,7 +66,7 @@ $.each( tests, function( widget, html ) { QUnit.test( "refresh: " + widget + ": " + name, function( assert ) { assert.expect( 41 ); - var i, control, currentClasses, + var i, control, label, currentClasses, controls = [], element = $( "