diff options
author | Konstantin Dinev <kdinev@mail.bw.edu> | 2016-01-21 16:40:23 +0200 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2016-03-30 14:08:41 -0400 |
commit | 623b64eefc36ac841fde1e33db15903066cef94c (patch) | |
tree | 175ea1d6ed0c0a8aa4ee378d7df108bd739bf789 /tests | |
parent | a1905e2c5ed6e61e6a7206e005de9dda4f7135d0 (diff) | |
download | jquery-ui-623b64eefc36ac841fde1e33db15903066cef94c.tar.gz jquery-ui-623b64eefc36ac841fde1e33db15903066cef94c.zip |
Resizable: Implement `setOption` for handles
Fixes #3423
Closes gh-1666
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/resizable/options.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/unit/resizable/options.js b/tests/unit/resizable/options.js index 2d44eb8ee..ae390ad93 100644 --- a/tests/unit/resizable/options.js +++ b/tests/unit/resizable/options.js @@ -410,6 +410,33 @@ test( "zIndex, applied to all handles", function() { } ); } ); +test( "setOption handles", function() { + expect( 11 ); + + var target = $( "<div></div>" ).resizable(); + + function checkHandles( expectedHandles ) { + expectedHandles = expectedHandles.map( function( value ) { + return ".ui-resizable-" + value; + } ); + + var handles = target.find( ".ui-resizable-handle" ); + + equal( handles.length, expectedHandles.length, "Correct number of handles found" ); + $.each( expectedHandles, function( index, handleClass ) { + equal( handles.filter( handleClass ).length, 1, "Found " + handleClass ); + } ); + } + + checkHandles( [ "e", "s", "se" ] ); + + target.resizable( "option", "handles", "n, w, nw" ); + checkHandles( [ "n", "w", "nw" ] ); + + target.resizable( "option", "handles", "s, w" ); + checkHandles( [ "s", "w" ] ); +} ); + test( "alsoResize + containment", function() { expect( 4 ); var other = $( "<div>" ) |