aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Lundgren <eduardolundgren@gmail.com>2008-06-03 19:59:41 +0000
committerEduardo Lundgren <eduardolundgren@gmail.com>2008-06-03 19:59:41 +0000
commitef18dbbd76f0b332cae2facb5f3bca3be3cbe225 (patch)
treec13ac180be8549bf5a107a475d7cbbe8815b0ece
parent29b7b4882f4953babe26a5623e2a4087c1008ccc (diff)
downloadjquery-ui-ef18dbbd76f0b332cae2facb5f3bca3be3cbe225.tar.gz
jquery-ui-ef18dbbd76f0b332cae2facb5f3bca3be3cbe225.zip
Resizable grid option automated test added
-rw-r--r--ui/tests/resizable.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/ui/tests/resizable.js b/ui/tests/resizable.js
index a6745ae7c..0d01344cd 100644
--- a/ui/tests/resizable.js
+++ b/ui/tests/resizable.js
@@ -357,20 +357,23 @@ test("ui-resizable-ne { aspectRatio: 'preserve', handles: 'all', minWidth: 70, m
});
-test("ui-resizable-nw { aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 }", function() {
+module("Options");
+
+test("ui-resizable-se { handles: 'all', gird: [20, 20] }", function() {
- var handle = '.ui-resizable-nw', target = $('#resizable1').resizable({ aspectRatio: 'preserve', handles: 'all', minWidth: 70, minHeight: 50, maxWidth: 150, maxHeight: 130 });
+ var handle = '.ui-resizable-se', target = $('#resizable1').resizable({ handles: 'all', grid: [20, 20] });
expect(4);
- drag(handle, -80, -80);
+ drag(handle, 10, 10);
- equals( 130, target.width(), "compare maxWidth");
- equals( 130, target.height(), "compare maxHeight");
+ equals( 100, target.width(), "compare width");
+ equals( 100, target.height(), "compare height");
- drag(handle, 130, 130);
+ drag(handle, 30, 30);
+
+ equals( 120, target.width(), "compare width");
+ equals( 120, target.height(), "compare height");
- equals( 70, target.width(), "compare minWidth");
- equals( 50, target.height(), "compare minHeight");
});