diff options
Diffstat (limited to 'tests/unit/controlgroup/options.js')
-rw-r--r-- | tests/unit/controlgroup/options.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/unit/controlgroup/options.js b/tests/unit/controlgroup/options.js index e2e8f4ee7..90a57e093 100644 --- a/tests/unit/controlgroup/options.js +++ b/tests/unit/controlgroup/options.js @@ -18,66 +18,66 @@ test( "disabled", function( assert ) { assert.lacksClasses( element, "ui-state-disabled" ); strictEqual( element.find( ".ui-state-disabled" ).length, 0, "Child widgets are not disabled" ); -}); +} ); test( "items - null", function() { expect( 2 ); - var element = $( ".controlgroup" ).controlgroup({ + var element = $( ".controlgroup" ).controlgroup( { items: { "button": null, "selectmenu": null, "checkboxradio": null } - }); + } ); strictEqual( element.children( ".ui-button" ).length, 0, "Child widgets are not called when selector is null" ); element.controlgroup( "option", "items", { "button": "button" - }); + } ); strictEqual( element.children( ".ui-button" ).length, 2, "Correct child widgets are called when selector is updated" ); -}); +} ); test( "items: custom selector", function() { expect( 1 ); - var element = $( ".controlgroup" ).controlgroup({ + var element = $( ".controlgroup" ).controlgroup( { items: { "button": ".button" } - }); + } ); strictEqual( element.children( ".ui-button" ).length, 4, "Correct child widgets are called when custom selector used" ); -}); +} ); $.widget( "ui.test", { - _create: function (){ + _create: function() { this.element.addClass( "ui-test ui-button" ); }, // Controlgroup requires a refresh method to exist refresh: $.noop -}); +} ); test( "items: custom widget", function() { expect( 2 ); - var element = $( ".controlgroup" ).controlgroup({ + var element = $( ".controlgroup" ).controlgroup( { items: { "test": ".test" } - }); + } ); strictEqual( element.children( ".ui-button" ).length, 7, "Correct child widgets are called when custom selector used" ); strictEqual( element.children( ".ui-test" ).length, 1, "Custom widget called" ); -}); +} ); test( "excludeInvisible", function( assert ) { expect( 4 ); - var element = $( ".controlgroup" ).controlgroup({ + var element = $( ".controlgroup" ).controlgroup( { excludeInvisible: false - }), + } ), buttons = element.children( ".ui-button" ); assert.lacksClassStart( buttons.eq( 1 ), "ui-corner" ); @@ -88,7 +88,7 @@ test( "excludeInvisible", function( assert ) { assert.lacksClassStart( buttons.eq( 0 ), "ui-corner" ); assert.hasClasses( buttons.eq( 1 ), "ui-corner-left", "ExcludeInvisible: true: First button is hidden second button get corner class" ); -}); +} ); test( "direction", function( assert ) { expect( 6 ); @@ -103,6 +103,6 @@ test( "direction", function( assert ) { assert.hasClasses( element, "ui-controlgroup-vertical" ); assert.hasClasses( buttons.first(), "ui-corner-top" ); assert.hasClasses( buttons.last(), "ui-corner-bottom" ); -}); +} ); } ); |