aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-06-08 03:37:43 +0000
committerRichard Worth <rdworth@gmail.com>2008-06-08 03:37:43 +0000
commit67117bc5639e8544769c4fd75366baaf44dbd9a8 (patch)
treeae115580ded64a7a56f1310b7a73b3265d0b0719
parentf193346177ee558e43531ff4be6c2d57de82cb93 (diff)
downloadjquery-ui-67117bc5639e8544769c4fd75366baaf44dbd9a8.tar.gz
jquery-ui-67117bc5639e8544769c4fd75366baaf44dbd9a8.zip
tests dialog - draggable option
-rw-r--r--tests/dialog.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/dialog.js b/tests/dialog.js
index 0a70da97e..9e40562e0 100644
--- a/tests/dialog.js
+++ b/tests/dialog.js
@@ -38,13 +38,13 @@ var moved = function (dx, dy, msg) {
}
function shouldmove(why) {
- var handle = $(".ui-dialog-titlebar", el.data("dialog").element);
+ var handle = $(".ui-dialog-titlebar", dlg());
drag(handle, 50, 50);
moved(50, 50, why);
}
function shouldnotmove(why) {
- var handle = $(".ui-dialog-titlebar", el.data("dialog").element);
+ var handle = $(".ui-dialog-titlebar", dlg());
drag(handle, 50, 50);
moved(0, 0, why);
}
@@ -192,6 +192,14 @@ test("buttons", function() {
btn.trigger("click");
});
+test("draggable", function() {
+ el = $("<div/>").dialog({ draggable: false });
+ shouldnotmove();
+ el.remove();
+ el = $("<div/>").dialog({ draggable: true });
+ shouldmove();
+});
+
module("dialog: Methods");
module("dialog: Callbacks");