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 = $("
").dialog({ draggable: false }); + shouldnotmove(); + el.remove(); + el = $("
").dialog({ draggable: true }); + shouldmove(); +}); + module("dialog: Methods"); module("dialog: Callbacks");