aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/index.html96
-rw-r--r--tests/static/accordion/default.html21
-rw-r--r--tests/static/dialog/default.html7
-rw-r--r--tests/static/selectable/default.html9
-rw-r--r--tests/static/sortable/default.html9
-rw-r--r--tests/visual/accordion/default.html12
-rw-r--r--tests/visual/dialog/default.html4
-rw-r--r--tests/visual/draggable/default.html6
-rw-r--r--tests/visual/droppable/default.html9
-rw-r--r--tests/visual/selectable/default.html6
-rw-r--r--tests/visual/sortable/default.html6
11 files changed, 139 insertions, 46 deletions
diff --git a/tests/index.html b/tests/index.html
new file mode 100644
index 000000000..6b1ce73ad
--- /dev/null
+++ b/tests/index.html
@@ -0,0 +1,96 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Tests</title>
+ <link rel="stylesheet" href="../themes/base/ui.all.css" type="text/css" />
+ <script type="text/javascript" src="../jquery-1.3.1.js"></script>
+ <script type="text/javascript" src="../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../ui/ui.draggable.js"></script>
+ <style type="text/css">
+ body { font-size: 62.5%; }
+ dd.plugin { margin-top: 0.3em; margin-bottom: 1em; }
+ iframe { border: 0; width: 200px; 150px; }
+ td { border: 1px solid silver; padding: 10px; }
+ </style>
+</head>
+
+<body>
+
+<table id="matrix">
+<thead>
+ <tr>
+ <th>Interaction</th>
+ <th style="width:220px;">Static</th>
+ <th style="width:220px;">Visual</th>
+ </tr>
+</thead>
+<tbody>
+ <tr class="test-draggable-default"><th>Draggable</th><td></td><td></td></tr>
+ <tr class="test-droppable-default"><th>Droppable</th><td></td><td></td></tr>
+ <tr class="test-resizable-default"><th>Resizable</th><td></td><td></td></tr>
+ <tr class="test-selectabe-default"><th>Selectable</th><td></td><td></td></tr>
+ <tr class="test-sortable-default"><th>Sortable</th><td></td><td></td></tr>
+</tbody>
+<thead>
+ <tr>
+ <th>Widget</th>
+ <th style="width:220px;">Static</th>
+ <th style="width:220px;">Visual</th>
+ </tr>
+</thead>
+<tbody>
+ <tr class="test-accordion-default"><th>Accordion</th><td></td><td></td></tr>
+ <tr class="test-datepicker-default"><th>Datepicker</th><td></td><td></td></tr>
+ <tr class="test-dialog-default"><th>Dialog</th><td></td><td></td></tr>
+ <tr class="test-progressbar-default"><th>Progressbar</th><td></td><td></td></tr>
+ <tr class="test-slider-default"><th>slider</th><td></td><td></td></tr>
+ <tr class="test-tabs-default"><th>Tabs</th><td></td><td></td></tr>
+</tbody>
+</table>
+
+<dl id="plugins">
+
+</dl>
+
+<script type="text/javascript">
+
+var matrix = $("#matrix");
+
+matrix.children("tbody").children("tr").each(function() {
+
+ var tr = $(this), th = tr.find("th"), pluginName = th.text().toLowerCase(), staticTd = th.next(), visualTd = staticTd.next();
+
+ var staticUrl = 'static/' + pluginName + '/default.html';
+ var visualUrl = 'visual/' + pluginName + '/default.html';
+
+ $.get(staticUrl, function(data) {
+ data = data.replace(/<script.*>.*<\/script>/ig,""); // Remove script tags
+ data = data.replace(/<\/?link.*>/ig,""); //Remove link tags
+ data = data.replace(/<\/?html.*>/ig,""); //Remove html tag
+ data = data.replace(/<\/?body.*>/ig,""); //Remove body tag
+ data = data.replace(/<\/?head.*>/ig,""); //Remove head tag
+ data = data.replace(/<title.*>.*<\/title>/ig,""); // Remove title tags
+ data = data.replace(/\s*<\/?!doctype.*>\s*/ig,""); //Remove doctype
+ var staticHtml = $("<div></div>").html(data).html();
+ staticTd.html(staticHtml);
+ });
+
+ visualTd.append('<iframe src="' + visualUrl + '"></iframe>');
+
+ var iframe = visualTd.find("iframe");
+
+ iframe.load(function() {
+ //alert($("body", this.contentDocument).html());
+ $(this).after($("body", this.contentDocument).html()).remove();
+ (pluginName == 'dialog') && $("#dialog").parents(".ui-dialog").css({
+ position: "relative",
+ top: null, left: null
+ });
+ });
+
+});
+
+</script>
+
+</body>
+</html>
diff --git a/tests/static/accordion/default.html b/tests/static/accordion/default.html
index aba29dcec..78a766a1c 100644
--- a/tests/static/accordion/default.html
+++ b/tests/static/accordion/default.html
@@ -12,31 +12,40 @@
<div class="ui-accordion ui-widget ui-helper-reset">
<div class="ui-accordion-group ui-accordion-selected">
- <h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" tabindex="0"><span class="ui-icon ui-icon-triangle-1-s"></span><a href="#">First</a></h3>
+ <h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top" tabindex="0">
+ <span class="ui-icon ui-icon-triangle-1-s"></span>
+ <a href="#">Accordion Header 1</a>
+ </h3>
<div>
<div class="ui-accordion-content-wrap ui-helper-reset ui-widget-content ui-corner-bottom">
<div class="ui-accordion-content">
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
+ Accordion Content 1
</div>
</div>
</div>
</div>
<div class="ui-accordion-group">
- <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" tabindex="0"><span class="ui-icon ui-icon-triangle-1-e"></span><a href="#">Second</a></h3>
+ <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" tabindex="0">
+ <span class="ui-icon ui-icon-triangle-1-e"></span>
+ <a href="#">Accordion Header 2</a>
+ </h3>
<div>
<div class="ui-accordion-content-wrap ui-helper-reset ui-widget-content ui-corner-bottom" style="height: 95px; display: none;">
<div class="ui-accordion-content">
- <p>Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</p>
+ Accordion Content 2
</div>
</div>
</div>
</div>
<div class="ui-accordion-group">
- <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" tabindex="0"><span class="ui-icon ui-icon-triangle-1-e"></span><a href="#">Third</a></h3>
+ <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" tabindex="0">
+ <span class="ui-icon ui-icon-triangle-1-e"></span>
+ <a href="#">Accordion Header 3</a>
+ </h3>
<div>
<div class="ui-accordion-content-wrap ui-helper-reset ui-widget-content ui-corner-bottom" style="height: 95px; display: none;">
<div class="ui-accordion-content">
- <p>Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</p>
+ Accordion Content 2
</div>
</div>
</div>
diff --git a/tests/static/dialog/default.html b/tests/static/dialog/default.html
index 71006b4fa..8be691d15 100644
--- a/tests/static/dialog/default.html
+++ b/tests/static/dialog/default.html
@@ -16,12 +16,7 @@
<a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button" title="Close"><span class="ui-icon ui-icon-closethick">Close</span></a>
</div>
<div class="ui-dialog-content ui-widget-content" style="height: 13em;">
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
- </div>
- <div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
- <button class="ui-state-default ui-priority-primary ui-corner-all">Primary</button>
- <button class="ui-state-default ui-priority-secondary ui-corner-all">Secondary</button>
- <button class="ui-state-default ui-state-disabled ui-corner-all">Disabled</button>
+ <p> Dialog Content </p>
</div>
<div class="ui-resizable-n ui-resizable-handle"></div>
<div class="ui-resizable-s ui-resizable-handle"></div>
diff --git a/tests/static/selectable/default.html b/tests/static/selectable/default.html
index 3fb75be42..45fd5a9b7 100644
--- a/tests/static/selectable/default.html
+++ b/tests/static/selectable/default.html
@@ -11,12 +11,9 @@
<body>
<div class="ui-selectable">
- <p>
- Selectable
- </p>
- <div class="ui-selectee">First</div>
- <div class="ui-selectee">Second</div>
- <div class="ui-selectee">Third</div>
+ <div class="ui-selectee">Selectable 1</div>
+ <div class="ui-selectee">Selectable 2</div>
+ <div class="ui-selectee">Selectable 3</div>
</div>
</body>
diff --git a/tests/static/sortable/default.html b/tests/static/sortable/default.html
index 4a779d634..dfbdd0cb6 100644
--- a/tests/static/sortable/default.html
+++ b/tests/static/sortable/default.html
@@ -11,12 +11,9 @@
<body>
<div class="ui-sortable">
- <p>
- Sortable
- </p>
- <div>First</div>
- <div>Second</div>
- <div>Third</div>
+ <div>Sortable 1</div>
+ <div>Sortable 2</div>
+ <div>Sortable 3</div>
</div>
</body>
diff --git a/tests/visual/accordion/default.html b/tests/visual/accordion/default.html
index 6c8372f54..d8b94dc63 100644
--- a/tests/visual/accordion/default.html
+++ b/tests/visual/accordion/default.html
@@ -17,21 +17,21 @@
<div id="accordion">
<div>
- <h3><a href="#">First</a></h3>
+ <h3><a href="#">Accordion Header 1</a></h3>
<div>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+ Accordion Content 1
</div>
</div>
<div>
- <h3><a href="#">Second</a></h3>
+ <h3><a href="#">Accordion Header 2</a></h3>
<div>
- Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.
+ Accordion Content 2
</div>
</div>
<div>
- <h3><a href="#">Third</a></h3>
+ <h3><a href="#">Accordion Header 3</a></h3>
<div>
- Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.
+ Accordion Content 3
</div>
</div>
</div>
diff --git a/tests/visual/dialog/default.html b/tests/visual/dialog/default.html
index e3165d759..290463f48 100644
--- a/tests/visual/dialog/default.html
+++ b/tests/visual/dialog/default.html
@@ -17,7 +17,9 @@
</head>
<body>
-<div id="dialog"></div>
+<div id="dialog" title="Dialog Title">
+ <p> Dialog Content </p>
+</div>
</body>
</html>
diff --git a/tests/visual/draggable/default.html b/tests/visual/draggable/default.html
index 4d868b756..1b77e551f 100644
--- a/tests/visual/draggable/default.html
+++ b/tests/visual/draggable/default.html
@@ -14,8 +14,8 @@
</script>
</head>
<body>
-
-<div id="draggable">Draggable</div>
-
+<div id="draggable">
+ <p> Draggable </p>
+</div>
</body>
</html>
diff --git a/tests/visual/droppable/default.html b/tests/visual/droppable/default.html
index 3f12c3571..2a03da716 100644
--- a/tests/visual/droppable/default.html
+++ b/tests/visual/droppable/default.html
@@ -10,16 +10,13 @@
<script type="text/javascript" src="../../../ui/ui.droppable.js"></script>
<script type="text/javascript">
$(function() {
- $("#draggable").draggable();
$("#droppable").droppable();
});
</script>
</head>
<body>
-
-<div id="draggable">Draggable</div>
-
-<div id="droppable">Droppable</div>
-
+<div id="droppable">
+ <p> Droppable </p>
+</div>
</body>
</html>
diff --git a/tests/visual/selectable/default.html b/tests/visual/selectable/default.html
index 69f145933..ffcfe43d3 100644
--- a/tests/visual/selectable/default.html
+++ b/tests/visual/selectable/default.html
@@ -17,9 +17,9 @@
<body>
<div id="selectable">
- <div>First</div>
- <div>Second</div>
- <div>Third</div>
+ <div>Selectable 1</div>
+ <div>Selectable 2</div>
+ <div>Selectable 3</div>
</div>
</body>
diff --git a/tests/visual/sortable/default.html b/tests/visual/sortable/default.html
index 8747e0b64..0dc4b3dbf 100644
--- a/tests/visual/sortable/default.html
+++ b/tests/visual/sortable/default.html
@@ -17,9 +17,9 @@
<body>
<div id="sortable">
- <div>First</div>
- <div>Second</div>
- <div>Third</div>
+ <div>Sortable 1</div>
+ <div>Sortable 2</div>
+ <div>Sortable 3</div>
</div>
</body>