diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-09 00:30:34 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-10-08 14:02:36 -0400 |
commit | a00c02513d81ed5d86b056f8734105a1c2d82ea8 (patch) | |
tree | 68fdf06a23716acb97c2cce140cc105e6fab17e2 /tests | |
parent | de1296b98515c586d620c40b6c566129f5013208 (diff) | |
download | jquery-ui-a00c02513d81ed5d86b056f8734105a1c2d82ea8.tar.gz jquery-ui-a00c02513d81ed5d86b056f8734105a1c2d82ea8.zip |
Controlgroup: Add missing entry to demos bootstrap
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/controlgroup/common.js | 8 | ||||
-rw-r--r-- | tests/unit/controlgroup/controlgroup_core.js | 77 | ||||
-rw-r--r-- | tests/unit/controlgroup/core.js | 8 | ||||
-rw-r--r-- | tests/unit/controlgroup/methods.js | 8 | ||||
-rw-r--r-- | tests/unit/controlgroup/options.js | 8 |
5 files changed, 16 insertions, 93 deletions
diff --git a/tests/unit/controlgroup/common.js b/tests/unit/controlgroup/common.js index 421e92e71..b403e174c 100644 --- a/tests/unit/controlgroup/common.js +++ b/tests/unit/controlgroup/common.js @@ -1,9 +1,9 @@ define( [ "lib/common", - "ui/controlgroup", - "ui/checkboxradio", - "ui/selectmenu", - "ui/button" + "ui/widgets/controlgroup", + "ui/widgets/checkboxradio", + "ui/widgets/selectmenu", + "ui/widgets/button" ], function( common ) { common.testWidget( "controlgroup", { diff --git a/tests/unit/controlgroup/controlgroup_core.js b/tests/unit/controlgroup/controlgroup_core.js deleted file mode 100644 index 2177c767b..000000000 --- a/tests/unit/controlgroup/controlgroup_core.js +++ /dev/null @@ -1,77 +0,0 @@ -module( "Controlgroup: Core" ); - -function hasCornerClass( element ) { - return !!element.attr( "class" ).match( /ui-corner/g ); -} - -test( "selectmenu: open/close corners", function( assert ) { - expect( 1 ); - var element = $( ".controlgroup" ).controlgroup(), - selects = element.find( "select" ), - selectButton = selects.eq( 0 ).selectmenu( "widget" ); - - expect( 12 ); - - selects.eq( 0 ).selectmenu( "open" ); - assert.hasClasses( selectButton, "ui-corner-tl", - "Horizontal: First selectmenu gets ui-corner-tl when opened" ); - - selects.eq( 0 ).selectmenu( "close" ); - assert.hasClasses( selectButton, "ui-corner-left", - "Horizontal: First selectmenu gets ui-corner-left when closed" ); - - selectButton = selects.eq( 1 ).selectmenu( "widget" ); - selects.eq( 1 ).selectmenu( "open" ); - strictEqual( hasCornerClass( selectButton ), false, - "Horizontal: Middle selectmenu does not get corner class when opened" ); - - selects.eq( 1 ).selectmenu( "close" ); - strictEqual( hasCornerClass( selectButton ), false, - "Horizontal: Middle selectmenu does not get corner class when closed" ); - - selectButton = selects.eq( 2 ).selectmenu( "widget" ); - selects.eq( 2 ).selectmenu( "open" ); - assert.hasClasses( selectButton, "ui-corner-tr", - "Horizontal: Last selectmenu gets ui-corner-tr when opened" ); - - selects.eq( 2 ).selectmenu( "close" ); - assert.hasClasses( selectButton, "ui-corner-right", - "Horizontal: Last selectmenu gets ui-corner-right when closed" ); - - element.controlgroup( "option", "direction", "vertical" ); - selectButton = selects.eq( 0 ).selectmenu( "widget" ); - selects.eq( 0 ).selectmenu( "open" ); - assert.hasClasses( selectButton, "ui-corner-top", - "vertical: First selectmenu gets ui-corner-top when opened" ); - - selects.eq( 0 ).selectmenu( "close" ); - assert.hasClasses( selectButton, "ui-corner-top", - "vertical: First selectmenu gets ui-corner-top when closed" ); - - selectButton = selects.eq( 1 ).selectmenu( "widget" ); - selects.eq( 1 ).selectmenu( "open" ); - strictEqual( hasCornerClass( selectButton ), false, - "vertical: Middle selectmenu does not get corner class when opened" ); - - selects.eq( 1 ).selectmenu( "close" ); - strictEqual( hasCornerClass( selectButton ), false, - "vertical: Middle selectmenu does not get corner class when closed" ); - - selectButton = selects.eq( 2 ).selectmenu( "widget" ); - selects.eq( 2 ).selectmenu( "open" ); - strictEqual( hasCornerClass( selectButton ), false, - "vertical: Last selectmenu does not get corner class when opened" ); - - selects.eq( 2 ).selectmenu( "close" ); - assert.hasClasses( selectButton, "ui-corner-bottom", - "vertical: Last selectmenu gets ui-corner-bottom when closed" ); -}); -test( "invisibles excluded from corner classes", function( assert ) { - expect( 2 ); - var element = $( ".controlgroup" ).controlgroup(), - buttons = element.children( ".ui-button" ); - strictEqual( hasCornerClass( buttons.eq( 0 ) ), false, - "ExcludeInvisible: true: Hidden first element does not get a corner class" ); - assert.hasClasses( buttons.eq( 1 ), "ui-corner-left", - "ExcludeInvisible: true: First button is hidden second button get corner class" ); -});
\ No newline at end of file diff --git a/tests/unit/controlgroup/core.js b/tests/unit/controlgroup/core.js index f84136b2f..385e0cfd4 100644 --- a/tests/unit/controlgroup/core.js +++ b/tests/unit/controlgroup/core.js @@ -1,9 +1,9 @@ define( [ "jquery", - "ui/controlgroup", - "ui/checkboxradio", - "ui/selectmenu", - "ui/button" + "ui/widgets/controlgroup", + "ui/widgets/checkboxradio", + "ui/widgets/selectmenu", + "ui/widgets/button" ], function( $ ) { module( "Controlgroup: Core" ); diff --git a/tests/unit/controlgroup/methods.js b/tests/unit/controlgroup/methods.js index c691e4c46..de1d56f9d 100644 --- a/tests/unit/controlgroup/methods.js +++ b/tests/unit/controlgroup/methods.js @@ -1,9 +1,9 @@ define( [ "jquery", - "ui/controlgroup", - "ui/checkboxradio", - "ui/selectmenu", - "ui/button" + "ui/widgets/controlgroup", + "ui/widgets/checkboxradio", + "ui/widgets/selectmenu", + "ui/widgets/button" ], function( $ ) { module( "Controlgroup: methods" ); diff --git a/tests/unit/controlgroup/options.js b/tests/unit/controlgroup/options.js index 82375381a..e2e8f4ee7 100644 --- a/tests/unit/controlgroup/options.js +++ b/tests/unit/controlgroup/options.js @@ -1,9 +1,9 @@ define( [ "jquery", - "ui/controlgroup", - "ui/checkboxradio", - "ui/selectmenu", - "ui/button" + "ui/widgets/controlgroup", + "ui/widgets/checkboxradio", + "ui/widgets/selectmenu", + "ui/widgets/button" ], function( $ ) { module( "Controlgroup: options" ); |