aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/draggable
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2009-02-07 14:09:07 +0000
committerRichard Worth <rdworth@gmail.com>2009-02-07 14:09:07 +0000
commitb3702cf1a124a90ecd848e01cbfacf7a9e73b12b (patch)
treebb1b268ecb61d35885a6efbcbdcde37d91615ece /tests/visual/draggable
parent191ec35cf1431fe15636719dedd8105328f2c39f (diff)
downloadjquery-ui-b3702cf1a124a90ecd848e01cbfacf7a9e73b12b.tar.gz
jquery-ui-b3702cf1a124a90ecd848e01cbfacf7a9e73b12b.zip
draggable unit tests: Added a few tests
Diffstat (limited to 'tests/visual/draggable')
-rw-r--r--tests/visual/draggable/draggable_option_containment_array.html24
-rw-r--r--tests/visual/draggable/draggable_option_cursorAt_array.html (renamed from tests/visual/draggable/draggable.handle.html)20
-rw-r--r--tests/visual/draggable/draggable_option_cursorAt_object.html24
-rw-r--r--tests/visual/draggable/draggable_option_handle_selector.html26
4 files changed, 81 insertions, 13 deletions
diff --git a/tests/visual/draggable/draggable_option_containment_array.html b/tests/visual/draggable/draggable_option_containment_array.html
new file mode 100644
index 000000000..0a58cae1c
--- /dev/null
+++ b/tests/visual/draggable/draggable_option_containment_array.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Draggable Visual Test : Draggable option containment array</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
+ <script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
+ <script type="text/javascript" src="../../../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ $("#draggable").css({ width: 100, height: 100, background: '#abc' });
+ $("#draggable").draggable({
+ containment: [50, 100, 400, 350]
+ });
+ });
+ </script>
+</head>
+<body>
+<div id="draggable">
+ <p> Draggable </p>
+</div>
+</body>
+</html>
diff --git a/tests/visual/draggable/draggable.handle.html b/tests/visual/draggable/draggable_option_cursorAt_array.html
index 1ff9b39fc..748a94eaf 100644
--- a/tests/visual/draggable/draggable.handle.html
+++ b/tests/visual/draggable/draggable_option_cursorAt_array.html
@@ -1,30 +1,24 @@
<!doctype html>
<html lang="en">
<head>
- <title>Simple Draggable with Handle</title>
- <link rel="stylesheet" href="../all.css" type="text/css">
+ <title>Draggable Visual Test : Draggable option cursorAt array</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
<script type="text/javascript" src="../../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
<script type="text/javascript">
$(function() {
+ $("#draggable").css({ width: 100, height: 100, background: '#abc' });
$("#draggable").draggable({
- handle: "span"
+ cursorAt: [5, -5]
});
});
</script>
</head>
<body>
-
-<ul class="plugins">
-<li class="plugin">
- Draggable
- <div id="draggable">
- <span>Handle</span>
- </div>
-</li>
-</ul>
-
+<div id="draggable">
+ <p> Draggable </p>
+</div>
</body>
</html>
diff --git a/tests/visual/draggable/draggable_option_cursorAt_object.html b/tests/visual/draggable/draggable_option_cursorAt_object.html
new file mode 100644
index 000000000..1fa5ab463
--- /dev/null
+++ b/tests/visual/draggable/draggable_option_cursorAt_object.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Draggable Visual Test : Draggable option cursorAt object</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
+ <script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
+ <script type="text/javascript" src="../../../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ $("#draggable").css({ width: 100, height: 100, background: '#abc' });
+ $("#draggable").draggable({
+ cursorAt: { top: -15, right: 15 }
+ });
+ });
+ </script>
+</head>
+<body>
+<div id="draggable">
+ <p> Draggable </p>
+</div>
+</body>
+</html>
diff --git a/tests/visual/draggable/draggable_option_handle_selector.html b/tests/visual/draggable/draggable_option_handle_selector.html
new file mode 100644
index 000000000..7548f1e7f
--- /dev/null
+++ b/tests/visual/draggable/draggable_option_handle_selector.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Draggable Visual Test : Draggable option handle selector</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
+ <script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
+ <script type="text/javascript" src="../../../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ $("#draggable").css({ width: 100, height: 100, background: '#abc' });
+ $("#draggable").draggable({
+ handle: ".handle"
+ });
+ });
+ </script>
+</head>
+<body>
+<div id="draggable">
+ <p> Draggable </p>
+ <p class="handle">Handle</p>
+ <p>Not handle</p>
+</div>
+</body>
+</html>