127 lines
4.3 KiB
HTML
127 lines
4.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Tablesorter Testing (WIP)</title>
|
|
<link rel="stylesheet" href="testing/qunit-1.11.0.css">
|
|
<link rel="stylesheet" href="testing/testing.css">
|
|
|
|
<script src="testing/qunit-1.11.0.js"></script>
|
|
<script src="testing/jshint-r12.js"></script>
|
|
<script src="testing/jquery-1.8.3.min.js"></script>
|
|
<script src="js/jquery.tablesorter.js"></script>
|
|
<script src="js/parsers/parser-ipv6.js"></script>
|
|
<script src="js/jquery.metadata.js"></script>
|
|
<script src="testing/testing.js"></script>
|
|
<script src="testing/testing-ipv6.js"></script>
|
|
|
|
</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>
|
|
<li><del>Sorting empty cells</del>.</li>
|
|
<li><del>Sorting strings in numeric columns</del>.</li>
|
|
<li>Internal rendering, caching & indexing utilities.</li>
|
|
<li><del>Update methods</del>.</li>
|
|
</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>
|
|
|
|
<table class="tester">
|
|
<thead>
|
|
<tr><th class="{sortValue:'zzz', poe:'nevermore'}">test-head</th><th>num</th></tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr><th>test-foot</th><th>txt</th></tr>
|
|
</tfoot>
|
|
<tbody>
|
|
<tr><td>test2</td><td>x2</td></tr>
|
|
<tr><td>test1</td><td>x3</td></tr>
|
|
<tr><td>test3</td><td>x1</td></tr>
|
|
</tbody>
|
|
<tbody class="tablesorter-infoOnly">
|
|
<tr><td colspan="3">Info</td></tr>
|
|
</tbody>
|
|
<tbody>
|
|
<tr><td>testB</td><td>x5</td></tr>
|
|
<tr><td>testC</td><td>x4</td></tr>
|
|
<tr><td>testA</td><td>x6</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table class="tester">
|
|
<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>
|
|
|
|
<table class="tester">
|
|
<thead>
|
|
<tr>
|
|
<th>1</th>
|
|
<th>2</th>
|
|
<th>3</th>
|
|
<th>4</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr><td>A43</td><td>-35</td><td>01</td><td>-.1</td></tr>
|
|
<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>
|
|
|
|
<table class="tester">
|
|
<thead>
|
|
<tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr><td>F01</td><td>F11</td><td>A21</td><td>01</td><td>ZZS</td><td>WA</td></tr>
|
|
<tr><td>F01</td><td>F11</td><td>A21</td><td>02</td><td>ZY</td><td>WB</td></tr>
|
|
<tr><td>F02</td><td>F12</td><td>A22</td><td>03</td><td>ZZ</td><td>WA</td></tr>
|
|
<tr><td>F02</td><td>F12</td><td>A22</td><td>04</td><td>ZZ</td><td>WB</td></tr>
|
|
<tr><td>F02</td><td>F12</td><td>A23</td><td>05</td><td>ZY</td><td>WA</td></tr>
|
|
<tr><td>F02</td><td>F12</td><td>A23</td><td>06</td><td>ZX</td><td>WB</td></tr>
|
|
<tr><td>F02</td><td>F12</td><td>A23</td><td>07</td><td>ZX</td><td>WA</td></tr>
|
|
<tr><td>F02</td><td>F13</td><td>A23</td><td>08</td><td>ZZ</td><td>WB</td></tr>
|
|
<tr><td>F03</td><td>F13</td><td>A24</td><td>09</td><td>ZZ</td><td>WA</td></tr>
|
|
<tr><td>F03</td><td>F13</td><td>A24</td><td>10</td><td>ZZ</td><td>WB</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<!-- empty table -->
|
|
<table class="tester">
|
|
<thead>
|
|
<tr><th>1</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
|
|
</body>
|
|
</html> |