aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBen Mosher <me@benmosher.com>2014-08-25 14:07:25 -0400
committerScott González <scott.gonzalez@gmail.com>2015-03-10 12:25:00 -0400
commit31e7099709a3bccaae8f83d397951096835269a2 (patch)
tree74c684e027580f258d1307dc334b55eb0ba0da9d /tests
parent65f31c2ead48755ac4cdffb95478a2f6d02801ff (diff)
downloadjquery-ui-31e7099709a3bccaae8f83d397951096835269a2.tar.gz
jquery-ui-31e7099709a3bccaae8f83d397951096835269a2.zip
Resizable: alsoResize more than one element of a jQuery selection
Fixes #4666 Closes gh-1324 Closes gh-1461 (cherry picked from commit 19783fd3e6a6e6e02a2030028e8820076c3b1295)
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/resizable/resizable_options.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/unit/resizable/resizable_options.js b/tests/unit/resizable/resizable_options.js
index d68294845..7fd409cec 100644
--- a/tests/unit/resizable/resizable_options.js
+++ b/tests/unit/resizable/resizable_options.js
@@ -433,4 +433,34 @@ test( "alsoResize + containment", function() {
equal( other.height(), 150, "alsoResize constrained height at containment edge" );
});
+test( "alsoResize + multiple selection", function() {
+ expect( 6 );
+ var other1 = $( "<div>" )
+ .addClass( "other" )
+ .css({
+ width: 50,
+ height: 50
+ })
+ .appendTo( "body" ),
+ other2 = $( "<div>" )
+ .addClass( "other" )
+ .css({
+ width: 50,
+ height: 50
+ })
+ .appendTo( "body"),
+ element = $( "#resizable1" ).resizable({
+ alsoResize: other1.add( other2 ),
+ containment: "#container"
+ });
+
+ TestHelpers.resizable.drag( ".ui-resizable-se", 400, 400 );
+ equal( element.width(), 300, "resizable constrained width at containment edge" );
+ equal( element.height(), 200, "resizable constrained height at containment edge" );
+ equal( other1.width(), 250, "alsoResize o1 constrained width at containment edge" );
+ equal( other1.height(), 150, "alsoResize o1 constrained height at containment edge" );
+ equal( other2.width(), 250, "alsoResize o2 constrained width at containment edge" );
+ equal( other2.height(), 150, "alsoResize o2 constrained height at containment edge" );
+});
+
})(jQuery);