Skip to content
Permalink
Browse files

Added new test suite for common tests across all UI plugins

  • Loading branch information...
rdworth committed Nov 11, 2008
1 parent 2afb594 commit a08dfc9f6f53658494a8e5fa00a2846dea96e626
Showing with 79 additions and 0 deletions.
  1. +41 −0 tests/ui.html
  2. +38 −0 tests/ui.js
@@ -0,0 +1,41 @@
<!doctype html>
<html lang="en">
<head>
<title>jQuery UI Test Suite</title>

<link rel="stylesheet" href="qunit/testsuite.css" type="text/css" media="screen">

<script type="text/javascript" src="../jquery-1.2.6.js"></script>
<script type="text/javascript" src="../ui/ui.core.js"></script>
<script type="text/javascript" src="../ui/ui.accordion.js"></script>
<script type="text/javascript" src="../ui/ui.colorpicker.js"></script>
<script type="text/javascript" src="../ui/ui.datepicker.js"></script>
<script type="text/javascript" src="../ui/ui.dialog.js"></script>
<script type="text/javascript" src="../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../ui/ui.droppable.js"></script>
<script type="text/javascript" src="../ui/ui.progressbar.js"></script>
<script type="text/javascript" src="../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../ui/ui.selectable.js"></script>
<script type="text/javascript" src="../ui/ui.slider.js"></script>
<script type="text/javascript" src="../ui/ui.sortable.js"></script>
<script type="text/javascript" src="../ui/ui.spinner.js"></script>
<script type="text/javascript" src="../ui/ui.tabs.js"></script>

<script type="text/javascript" src="qunit/testrunner.js"></script>
<script type="text/javascript" src="ui.js"></script>

</head>
<body class="flora">

<h1 id="header">jQuery UI Test Suite</h1>
<h2 id="banner"></h2>
<h2 id="userAgent"></h2>

<ol id="tests"></ol>

<div id="main" style="position: absolute; top: -10000px; border: 1px solid black; padding: 10px; margin: 10px;">

</div>

</body>
</html>
@@ -0,0 +1,38 @@
/*
* core unit tests
*/
(function($) {

var plugins = [
"accordion",
"colorpicker",
"datepicker",
"dialog",
"draggable",
"droppable",
"progressbar",
"resizable",
"selectable",
"slider",
"sortable",
"spinner",
"tabs"
];

module("version");

test("core", function() {
equals($.ui.version, "@VERSION", "$.ui.version");
});

$(plugins).each(function() {
var pluginName = this;
test(pluginName, function() {
if ($.ui[pluginName])
equals($.ui[pluginName].version, "@VERSION", "$.ui." + pluginName + ".version");
else
ok(false, "$.ui." + pluginName + " undefined.");
});
});

})(jQuery);

0 comments on commit a08dfc9

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