diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2016-05-11 12:14:14 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2016-05-26 09:15:48 -0400 |
commit | 7d5e6d24969ef84eee51ae5b1557c7ce2e83c9ea (patch) | |
tree | 497c0126545ba1eea94694d12a54ecc696c6060d /tests/unit/controlgroup | |
parent | 81a8e30c07a3663728c98b15775b5580fa806cdd (diff) | |
download | jquery-ui-7d5e6d24969ef84eee51ae5b1557c7ce2e83c9ea.tar.gz jquery-ui-7d5e6d24969ef84eee51ae5b1557c7ce2e83c9ea.zip |
Controlgroup: Fix rendering of labels
Fixes #14967
Closes gh-1703
Diffstat (limited to 'tests/unit/controlgroup')
-rw-r--r-- | tests/unit/controlgroup/controlgroup.html | 1 | ||||
-rw-r--r-- | tests/unit/controlgroup/core.js | 12 | ||||
-rw-r--r-- | tests/unit/controlgroup/methods.js | 8 |
3 files changed, 15 insertions, 6 deletions
diff --git a/tests/unit/controlgroup/controlgroup.html b/tests/unit/controlgroup/controlgroup.html index 9983232ec..170676aa8 100644 --- a/tests/unit/controlgroup/controlgroup.html +++ b/tests/unit/controlgroup/controlgroup.html @@ -55,6 +55,7 @@ <option>Medium</option> <option>Slow</option> </select> + <label class="ui-controlgroup-label">Label</label> <button>Button with icon on the bottom</button> </div> </div> diff --git a/tests/unit/controlgroup/core.js b/tests/unit/controlgroup/core.js index 70d6267ad..b32d829ed 100644 --- a/tests/unit/controlgroup/core.js +++ b/tests/unit/controlgroup/core.js @@ -92,12 +92,12 @@ var assertSanatized = function( assert, initClasses, expectedClasses, message ) QUnit.test( "_resolveClassesValues", function( assert ) { assert.expect( 6 ); - assertSanatized( assert, "bar ui-corner-bottom", "bar", "Single Corner Class Removed end" ); - assertSanatized( assert, "ui-corner-bottom bar", "bar", "Single Corner Class Removed beginning" ); - assertSanatized( assert, "bar ui-corner-bottom ui-corner-left", "bar", "Multiple Corner Class Removed end" ); - assertSanatized( assert, "ui-corner-bottom ui-corner-left bar", "bar", "Multiple Corner Class Removed beginning" ); - assertSanatized( assert, "bar ui-corner-bottom ui-corner-left foo", "bar foo", "Multiple Corner Class Removed Middle" ); - assertSanatized( assert, "bar", "bar", "No corner Class" ); + assertSanatized( assert, "bar ui-corner-bottom", "bar", "Single corner class removed end" ); + assertSanatized( assert, "ui-corner-bottom bar", "bar", "Single corner class removed beginning" ); + assertSanatized( assert, "bar ui-corner-bottom ui-corner-left", "bar", "Multiple corner classes removed end" ); + assertSanatized( assert, "ui-corner-bottom ui-corner-left bar", "bar", "Multiple corner classes removed beginning" ); + assertSanatized( assert, "bar ui-corner-bottom ui-corner-left foo", "bar foo", "Multiple corner class removed middle" ); + assertSanatized( assert, "bar", "bar", "No corner classes" ); } ); } ); diff --git a/tests/unit/controlgroup/methods.js b/tests/unit/controlgroup/methods.js index a9d781f2e..09271d39f 100644 --- a/tests/unit/controlgroup/methods.js +++ b/tests/unit/controlgroup/methods.js @@ -177,4 +177,12 @@ QUnit.test( "Child Classes Option: refresh", function( assert ) { assert.hasClasses( selectmenu.selectmenu( "widget" ), "test-class" ); } ); +QUnit.test( "Controlgroup Label: refresh", function( assert ) { + assert.expect( 1 ); + var controlgroup = $( ".controlgroup-refresh" ).controlgroup(); + controlgroup.controlgroup( "refresh" ); + assert.strictEqual( controlgroup.find( ".ui-controlgroup-label-contents" ).length, 1, + "Controlgroup label does not re-wrap on refresh" ); +} ); + } ); |