From 03528f2942ad52ab1bfca8810aa5ce0bfe3ba4c7 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 9 Jun 2008 05:59:18 +0000 Subject: [PATCH] tests - wrapped in closures so all.html will work --- tests/accordion.js | 9 ++++++++- tests/all.html | 17 +++++++++++++++++ tests/dialog.js | 5 ++++- tests/draggable.js | 4 +++- tests/resizable.js | 3 +++ tests/selectable.js | 4 +++- tests/slider.js | 8 +++++++- 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 @@

Run individual testsuites or doubleclick a test below

@@ -198,6 +202,19 @@
Log of the 2nd accordion
+ +
I'm a resizable.
+ + + + + \ 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); -- 2.39.5