2012-12-17 20:32:57 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Tablesorter Testing (WIP)</title>
|
2015-07-24 17:32:22 +00:00
|
|
|
<link rel="stylesheet" href="testing/qunit-1.18.0.css">
|
2012-12-17 20:32:57 +00:00
|
|
|
<link rel="stylesheet" href="testing/testing.css">
|
|
|
|
|
2015-07-24 17:32:22 +00:00
|
|
|
<script src="testing/qunit-1.18.0.js"></script>
|
2014-05-21 22:09:23 +00:00
|
|
|
<script src="docs/js/jquery-latest.min.js"></script>
|
2012-12-17 20:32:57 +00:00
|
|
|
<script src="js/jquery.tablesorter.js"></script>
|
2015-05-15 02:32:41 +00:00
|
|
|
<script src="js/widgets/widget-filter.js"></script>
|
2015-07-24 17:32:22 +00:00
|
|
|
|
2014-09-30 21:20:04 +00:00
|
|
|
<script src="js/parsers/parser-network.js"></script>
|
2015-02-13 03:10:38 +00:00
|
|
|
<script src="js/extras/jquery.metadata.js"></script>
|
2015-07-24 17:32:22 +00:00
|
|
|
|
2012-12-17 20:32:57 +00:00
|
|
|
<script src="testing/testing.js"></script>
|
2013-10-17 23:36:46 +00:00
|
|
|
<script src="testing/testing-ipv6.js"></script>
|
2014-04-23 21:11:13 +00:00
|
|
|
<script src="testing/testing-widgets.js"></script>
|
2012-12-17 20:32:57 +00:00
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="qunit"></div>
|
|
|
|
<div id="qunit-fixture"></div>
|
|
|
|
|
|
|
|
<h3>This is a work-in-progress. It does not yet comprehensively test all sorting methods. The following are on the to do list:</h3>
|
|
|
|
<ul class="notes">
|
|
|
|
<li>Core tests:
|
|
|
|
<ul>
|
|
|
|
<li>Test each option, event & callback</li>
|
2013-05-09 04:36:06 +00:00
|
|
|
<li><del>Sorting empty cells</del>.</li>
|
|
|
|
<li><del>Sorting strings in numeric columns</del>.</li>
|
2012-12-17 20:32:57 +00:00
|
|
|
<li>Internal rendering, caching & indexing utilities.</li>
|
2013-03-27 23:21:09 +00:00
|
|
|
<li><del>Update methods</del>.</li>
|
2012-12-17 20:32:57 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li>All widgets.</li>
|
|
|
|
<li>Pager plugin.</li>
|
|
|
|
<li>Include <a href="https://github.com/overset/javascript-natural-sort">natural sort</a> unit tests?</li>
|
|
|
|
</ul>
|
|
|
|
|
2014-04-18 23:41:20 +00:00
|
|
|
<table id="table1" class="tester" data-text-extraction="basic">
|
2012-12-17 20:32:57 +00:00
|
|
|
<thead>
|
|
|
|
<tr><th class="{sortValue:'zzz', poe:'nevermore'}">test-head</th><th>num</th></tr>
|
|
|
|
</thead>
|
|
|
|
<tfoot>
|
2013-03-25 14:04:00 +00:00
|
|
|
<tr><th>test-foot</th><th>txt</th></tr>
|
2012-12-17 20:32:57 +00:00
|
|
|
</tfoot>
|
|
|
|
<tbody>
|
2014-04-18 23:41:20 +00:00
|
|
|
<tr><td data-text="test2">ignored</td><td>x2</td></tr>
|
|
|
|
<tr><td data-text="test1">ignored</td><td>x3</td></tr>
|
|
|
|
<tr><td data-text="test3">ignored</td><td>x1</td></tr>
|
2012-12-17 20:32:57 +00:00
|
|
|
</tbody>
|
|
|
|
<tbody class="tablesorter-infoOnly">
|
2015-03-28 21:50:52 +00:00
|
|
|
<tr><td colspan="2">Info</td></tr>
|
2012-12-17 20:32:57 +00:00
|
|
|
</tbody>
|
|
|
|
<tbody>
|
2015-06-23 21:11:29 +00:00
|
|
|
<tr><td data-text="">ignored</td><td>x0</td></tr>
|
2013-03-25 14:04:00 +00:00
|
|
|
<tr><td>testB</td><td>x5</td></tr>
|
|
|
|
<tr><td>testC</td><td>x4</td></tr>
|
|
|
|
<tr><td>testA</td><td>x6</td></tr>
|
2012-12-17 20:32:57 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2014-03-31 20:53:01 +00:00
|
|
|
<table id="table2" class="tester">
|
2012-12-17 20:32:57 +00:00
|
|
|
<thead>
|
|
|
|
<tr> <!-- all headers set to sorter false; jQuery data > meta > headers option > header class name -->
|
|
|
|
<th data-sorter="false" class="{sorter:'digit'} sorter-text">1</th> <!-- jQuery data -->
|
|
|
|
<th class="{sorter:false} sorter-text">2</th> <!-- metadata -->
|
|
|
|
<th class="sorter-text">3</th> <!-- headers option -->
|
|
|
|
<th class="sorter-false">4</th> <!-- class name -->
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr><td>a</td><td>b</td><td>c</td><td>d</td></tr>
|
|
|
|
<tr><td>z</td><td>y</td><td>x</td><td>w</td></tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2014-04-18 23:41:20 +00:00
|
|
|
<table id="table3" class="tester" data-text-extraction="x">
|
2013-05-09 04:36:06 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>1</th>
|
|
|
|
<th>2</th>
|
|
|
|
<th>3</th>
|
|
|
|
<th>4</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2014-04-18 23:41:20 +00:00
|
|
|
<tr><td data-text="x43">A43</td><td>-35</td><td>01</td><td>-.1</td></tr>
|
2013-05-09 04:36:06 +00:00
|
|
|
<tr><td>A255</td><td>33</td><td>02</td><td>N/A #1</td></tr>
|
|
|
|
<tr><td>A33</td><td>2</td><td>03</td><td>N/A #2</td></tr>
|
|
|
|
<tr><td>A1</td><td>-5</td><td>04</td><td>-8.4</td></tr>
|
|
|
|
<tr><td>A102</td><td>NR</td><td>05</td><td>-2.2</td></tr>
|
|
|
|
<tr><td>A10</td><td>-1</td><td>06</td><td>97.4</td></tr>
|
|
|
|
<tr><td>A02</td><td>1</td><td>07</td><td>23.6</td></tr>
|
|
|
|
<tr><td>A55</td><td>44</td><td></td><td>11.4</td></tr>
|
|
|
|
<tr><td>A87</td><td>04</td><td>NR</td><td>5.2</td></tr>
|
|
|
|
<tr><td></td><td></td><td>NR</td><td></td></tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2014-03-31 20:53:01 +00:00
|
|
|
<table id="table4" class="tester">
|
2014-03-02 07:01:28 +00:00
|
|
|
<thead>
|
2014-05-28 12:29:43 +00:00
|
|
|
<tr><th>1</th><th class="te-test">2</th><th>3</th><th>4</th><th>5</th><th>6</th><th class="parser-false">7</th></tr>
|
2014-03-02 07:01:28 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2014-05-28 12:29:43 +00:00
|
|
|
<tr><td>F01</td><td>x<span>F11</span></td><td>x<span>A21</span></td><td>01</td><td>ZZS</td><td>WA</td><td>x</td></tr>
|
|
|
|
<tr><td>F01</td><td>g<span>F11</span></td><td>g<span>A21</span></td><td>02</td><td>ZY</td><td>WB</td><td>x</td></tr>
|
|
|
|
<tr><td>F02</td><td>z<span>F12</span></td><td>z<span>A22</span></td><td>03</td><td>ZZ</td><td>WA</td><td>x</td></tr>
|
|
|
|
<tr><td>F02</td><td>b<span>F12</span></td><td>b<span>A22</span></td><td>04</td><td>ZZ</td><td>WB</td><td>x</td></tr>
|
|
|
|
<tr><td>F02</td><td>d<span>F12</span></td><td>d<span>A23</span></td><td>05</td><td>ZY</td><td>WA</td><td>x</td></tr>
|
|
|
|
<tr><td>F02</td><td>f<span>F12</span></td><td>f<span>A23</span></td><td>06</td><td>ZX</td><td>WB</td><td>x</td></tr>
|
|
|
|
<tr><td>F02</td><td>h<span>F12</span></td><td>h<span>A23</span></td><td>07</td><td>ZX</td><td>WA</td><td>x</td></tr>
|
|
|
|
<tr><td>F02</td><td>a<span>F13</span></td><td>a<span>A23</span></td><td>08</td><td>ZZ</td><td>WB</td><td>x</td></tr>
|
|
|
|
<tr><td>F03</td><td>c<span>F13</span></td><td>c<span>A24</span></td><td>09</td><td>ZZ</td><td>WA</td><td>x</td></tr>
|
|
|
|
<tr><td>F03</td><td>e<span>F13</span></td><td>e<span>A24</span></td><td>10</td><td>ZZ</td><td>WB</td><td>x</td></tr>
|
2014-03-02 07:01:28 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2014-03-07 02:28:47 +00:00
|
|
|
<!-- empty table -->
|
2014-03-31 20:53:01 +00:00
|
|
|
<table id="table5" class="tester">
|
2014-03-07 02:28:47 +00:00
|
|
|
<thead>
|
|
|
|
<tr><th>1</th></tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2014-04-23 21:11:13 +00:00
|
|
|
<div id="testblock" class="tester"></div>
|
2014-05-08 17:05:01 +00:00
|
|
|
<div id="testblock2" class="tester"></div>
|
2014-04-23 21:11:13 +00:00
|
|
|
|
2012-12-17 20:32:57 +00:00
|
|
|
</body>
|
|
|
|
</html>
|