Skip to content
Permalink
Browse files

tests dialog - draggable option

  • Loading branch information
rdworth committed Jun 8, 2008
1 parent f193346 commit 67117bc5639e8544769c4fd75366baaf44dbd9a8
Showing with 10 additions and 2 deletions.
  1. +10 −2 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");

0 comments on commit 67117bc

Please sign in to comment.
You can’t perform that action at this time.