diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2013-12-12 22:10:06 -0500 |
---|---|---|
committer | TJ VanToll <tj.vantoll@gmail.com> | 2014-01-15 15:38:10 -0500 |
commit | 28310ff55f062199fb2f187ea13d3561a879aea8 (patch) | |
tree | 84bfaf2266437b2357967dea5284207c71a30448 /tests/unit/sortable | |
parent | 1bbbcc723c489d7ef7d72bb62564b8f07805c41c (diff) | |
download | jquery-ui-28310ff55f062199fb2f187ea13d3561a879aea8.tar.gz jquery-ui-28310ff55f062199fb2f187ea13d3561a879aea8.zip |
Slider & Interactions: Add Windows 8 touch support
Fixes #9709
Fixes #9710
Closes gh-1152
Diffstat (limited to 'tests/unit/sortable')
-rw-r--r-- | tests/unit/sortable/sortable_core.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/sortable/sortable_core.js b/tests/unit/sortable/sortable_core.js index 18e7dae08..54069a9bf 100644 --- a/tests/unit/sortable/sortable_core.js +++ b/tests/unit/sortable/sortable_core.js @@ -16,4 +16,25 @@ test( "#9314: Sortable: Items cannot be dragged directly into bottom position", TestHelpers.sortable.sort( $( "li", el[ 1 ] )[ 0 ], 0, -12, 5, "Dragging the sortable into connected sortable" ); }); +test( "ui-sortable-handle applied to appropriate element", function() { + expect( 6 ); + var item = "<li><p></p></li>", + el = $( "<ul>" + item + item + "</ul>" ) + .sortable() + .appendTo( "#qunit-fixture" ); + + ok( el.find( "li:first" ).hasClass( "ui-sortable-handle" ), "defaults to item" ); + ok( el.find( "li:last" ).hasClass( "ui-sortable-handle" ), "both items received class name" ); + + el.sortable( "option", "handle", "p" ); + ok( !el.find( "li" ).hasClass( "ui-sortable-handle" ), "removed on change" ); + ok( el.find( "p" ).hasClass( "ui-sortable-handle" ), "applied to handle" ); + + el.append( item ).sortable( "refresh" ); + ok( el.find( "p:last" ).hasClass( "ui-sortable-handle" ), "class name applied on refresh" ); + + el.sortable( "destroy" ); + equal( el.find( ".ui-sortable-handle" ).length, 0, "class name removed on destroy" ); +}); + })( jQuery ); |