aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-06-09 05:59:18 +0000
committerRichard Worth <rdworth@gmail.com>2008-06-09 05:59:18 +0000
commit03528f2942ad52ab1bfca8810aa5ce0bfe3ba4c7 (patch)
treec2ae251d883b2b14cb81e439d3e306aa1c4e662e /tests
parentd2397d8d63a4e5325e0d6aff0ea8fc802da7468c (diff)
downloadjquery-ui-03528f2942ad52ab1bfca8810aa5ce0bfe3ba4c7.tar.gz
jquery-ui-03528f2942ad52ab1bfca8810aa5ce0bfe3ba4c7.zip
tests - wrapped in closures so all.html will work
Diffstat (limited to 'tests')
-rw-r--r--tests/accordion.js9
-rw-r--r--tests/all.html17
-rw-r--r--tests/dialog.js5
-rw-r--r--tests/draggable.js4
-rw-r--r--tests/resizable.js3
-rw-r--r--tests/selectable.js4
-rw-r--r--tests/slider.js8
7 files changed, 45 insertions, 5 deletions
diff --git a/tests/accordion.js b/tests/accordion.js
index c0e3edfc5..1fbd1e20c 100644
--- a/tests/accordion.js
+++ b/tests/accordion.js
@@ -1,3 +1,8 @@
+/*
+ * accordion unit tests
+ */
+(function($) {
+
module("accordion");
jQuery.ui.accordion.defaults.animated = false;
@@ -75,4 +80,6 @@ test("activate, jQuery or DOM element", function() {
state(ac, 1, 0, 0);
ac.accordion("activate", $("#list1 a")[1]);
state(ac, 0, 1, 0);
-}); \ No newline at end of file
+});
+
+})(jQuery);
diff --git a/tests/all.html b/tests/all.html
index b83b30fe2..99e53db39 100644
--- a/tests/all.html
+++ b/tests/all.html
@@ -44,6 +44,10 @@
<h4>Run individual testsuites or doubleclick a test below</h4>
<ul>
<li><a href="accordion.html">Accordion</a></li>
+ <li><a href="dialog.html">Dialog</a></li>
+ <li><a href="draggable.html">Draggable</a></li>
+ <li><a href="resizable.html">Resizable</a></li>
+ <li><a href="selectable.html">Selectable</a></li>
<li><a href="slider.html">Slider</a></li>
</ul>
@@ -198,6 +202,19 @@
</div>
<div id="log"><div><strong>Log of the 2nd accordion</strong></div></div>
+
+ <div id="resizable1" style="background: green; width: 100px; height: 100px;">I'm a resizable.</div>
+ <img src="images/test.jpg" id="resizable2" style="width: 100px; height: 100px;"/>
+
+
+ <ul id="selectable1">
+ <li>Item 1</li>
+ <li>Item 2</li>
+ <li class="special">Item 3</li>
+ <li>Item 4</li>
+ <li>Item 5</li>
+ </ul>
+
</div>
</body>
</html> \ No newline at end of file
diff --git a/tests/dialog.js b/tests/dialog.js
index c1c8ea54f..7520fe8b7 100644
--- a/tests/dialog.js
+++ b/tests/dialog.js
@@ -1,10 +1,11 @@
/*
* dialog unit tests
*/
-
+(function($) {
//
// Dialog Test Helper Functions
//
+
var el,
offsetBefore, offsetAfter,
heightBefore, heightAfter,
@@ -307,3 +308,5 @@ test("close", function() {
});
module("dialog: Tickets");
+
+})(jQuery);
diff --git a/tests/draggable.js b/tests/draggable.js
index d428a21ff..2f5a079de 100644
--- a/tests/draggable.js
+++ b/tests/draggable.js
@@ -1,7 +1,7 @@
/*
* draggable unit tests
*/
-
+(function($) {
//
// Draggable Test Helper Functions
//
@@ -487,3 +487,5 @@ test("#2965 cursorAt with margin", function() {
equals(actual.top, expected.top, "10px margin. top");
});
+
+})(jQuery);
diff --git a/tests/resizable.js b/tests/resizable.js
index 152691223..2e7da9adc 100644
--- a/tests/resizable.js
+++ b/tests/resizable.js
@@ -1,6 +1,7 @@
/*
* resizable tests
*/
+(function($) {
var drag = function(el, dx, dy, complete) {
@@ -398,3 +399,5 @@ test("ui-resizable-se { handles: 'all', grid: [0, 20] } wrapped", function() {
equals( target.height(), 120, "compare height");
});
+
+})(jQuery);
diff --git a/tests/selectable.js b/tests/selectable.js
index 2c127b11f..5060650d1 100644
--- a/tests/selectable.js
+++ b/tests/selectable.js
@@ -1,7 +1,7 @@
/*
* selectable unit tests
*/
-
+(function($) {
//
// Selectable Test Helper Functions
//
@@ -203,3 +203,5 @@ test("stop", function() {
});
module("selectable: Tickets");
+
+})(jQuery);
diff --git a/tests/slider.js b/tests/slider.js
index 7b6d095a5..b13acc4a9 100644
--- a/tests/slider.js
+++ b/tests/slider.js
@@ -1,3 +1,7 @@
+/*
+ * slider unit tests
+ */
+(function($) {
var keyCodes = {
leftArrow: 37,
@@ -107,4 +111,6 @@ test("handle creation", function() {
var instance = $.data(slider[0], "slider")
equals(instance.handle.length, 2);
ok(instance.handle.jquery, "handle must be a jquery object")
-}) \ No newline at end of file
+})
+
+})(jQuery);