Skip to content
Permalink
Browse files

tests - wrapped in closures so all.html will work

  • Loading branch information
rdworth committed Jun 9, 2008
1 parent d2397d8 commit 03528f2942ad52ab1bfca8810aa5ce0bfe3ba4c7
Showing with 45 additions and 5 deletions.
  1. +8 −1 tests/accordion.js
  2. +17 −0 tests/all.html
  3. +4 −1 tests/dialog.js
  4. +3 −1 tests/draggable.js
  5. +3 −0 tests/resizable.js
  6. +3 −1 tests/selectable.js
  7. +7 −1 tests/slider.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);
});
});

})(jQuery);
@@ -44,6 +44,10 @@ <h2 id="userAgent"></h2>
<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 @@ <h4>Run individual testsuites or doubleclick a test below</h4>
</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>
@@ -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);
@@ -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);
@@ -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);
@@ -1,7 +1,7 @@
/*
* selectable unit tests
*/

(function($) {
//
// Selectable Test Helper Functions
//
@@ -203,3 +203,5 @@ test("stop", function() {
});

module("selectable: Tickets");

})(jQuery);
@@ -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")
})
})

})(jQuery);

0 comments on commit 03528f2

Please sign in to comment.
You can’t perform that action at this time.