]> source.dussan.org Git - jquery-ui.git/commitdiff
tests dialog - draggable option
authorRichard Worth <rdworth@gmail.com>
Sun, 8 Jun 2008 03:37:43 +0000 (03:37 +0000)
committerRichard Worth <rdworth@gmail.com>
Sun, 8 Jun 2008 03:37:43 +0000 (03:37 +0000)
tests/dialog.js

index 0a70da97ebdb05788aeb91f47bfbd11e5f0c88b1..9e40562e0c38fd057db11f1c470b8d4ad7020e32 100644 (file)
@@ -38,13 +38,13 @@ var moved = function (dx, dy, msg) {
 }\r
 \r
 function shouldmove(why) {\r
-       var handle = $(".ui-dialog-titlebar", el.data("dialog").element);\r
+       var handle = $(".ui-dialog-titlebar", dlg());\r
        drag(handle, 50, 50);\r
        moved(50, 50, why);\r
 }\r
 \r
 function shouldnotmove(why) {\r
-       var handle = $(".ui-dialog-titlebar", el.data("dialog").element);\r
+       var handle = $(".ui-dialog-titlebar", dlg());\r
        drag(handle, 50, 50);\r
        moved(0, 0, why);\r
 }\r
@@ -192,6 +192,14 @@ test("buttons", function() {
        btn.trigger("click");\r
 });\r
 \r
+test("draggable", function() {\r
+       el = $("<div/>").dialog({ draggable: false });\r
+       shouldnotmove();\r
+       el.remove();\r
+       el = $("<div/>").dialog({ draggable: true });\r
+       shouldmove();\r
+});\r
+\r
 module("dialog: Methods");\r
 \r
 module("dialog: Callbacks");\r