mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Added new test suite for common tests across all UI plugins
This commit is contained in:
parent
2afb5942aa
commit
a08dfc9f6f
41
tests/ui.html
Normal file
41
tests/ui.html
Normal file
@ -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>
|
38
tests/ui.js
Normal file
38
tests/ui.js
Normal file
@ -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);
|
Loading…
Reference in New Issue
Block a user