forked from Mottie/tablesorter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
158 lines (145 loc) · 5.95 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Tablesorter Testing (WIP)</title>
<link rel="stylesheet" href="testing/qunit-2.4.0.css">
<link rel="stylesheet" href="testing/testing.css">
<script src="testing/qunit-2.4.0.js"></script>
<script src="docs/js/jquery-latest.min.js"></script>
<script src="js/jquery.tablesorter.js"></script>
<script src="js/widgets/widget-filter.js"></script>
<script src="js/parsers/parser-network.js"></script>
<script src="js/extras/jquery.metadata.js"></script>
<script src="testing/testing.js"></script>
<script src="testing/testing-ipv6.js"></script>
<script src="testing/testing-widgets.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 id="table1" class="tester" data-text-extraction="basic">
<thead>
<tr><th class="{sortValue:'zzz', poe:'nevermore'}">test-head</th><th>xnum</th></tr>
</thead>
<tfoot>
<tr><th>test-foot</th><th>txt</th></tr>
</tfoot>
<tbody>
<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>
</tbody>
<tbody class="tablesorter-infoOnly">
<tr><td colspan="2">Info</td></tr>
</tbody>
<tbody>
<tr><td data-text="">ignored</td><td>x0</td></tr>
<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 id="table2" 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 id="table3" class="tester" data-text-extraction="x">
<thead>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
</tr>
</thead>
<tbody>
<tr><td data-text="x43">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 id="table4" class="tester">
<thead>
<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>
</thead>
<tbody>
<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>
</tbody>
</table>
<!-- empty table -->
<table id="table5" class="tester">
<thead>
<tr><th>1</th></tr>
</thead>
<tbody>
</tbody>
</table>
<table id="table6" class="tester">
<thead>
<tr>
<th rowspan="2" colspan="2">Index</th>
<th colspan="4">Sort All Columns</th>
</tr>
<tr>
<th>Product ID</th>
<th>Numeric</th>
<th id="test">Animals</th>
<th >Url</th>
</tr>
</thead>
<tbody>
<tr><td>G1</td><td>6</td><td>a9</td><td>155</td><td>L</td><td>nytimes</td></tr>
<tr><td>G1</td><td>2</td><td colspan="4">z1 957 K mit</td></tr>
<tr><td>G3</td><td>0</td><td>a13</td><td colspan="2">17 K</td><td>google</td></tr>
<tr><td>G2</td><td>8</td><td>z9</td><td>10</td><td>G</td><td>facebook</td></tr>
<tr><td>G1</td><td>3</td><td colspan="2">z24 67</td><td>B</td><td>whitehouse</td></tr>
<tr><td>G4</td><td colspan="2">7 A10</td><td>87</td><td>Z</td><td>google</td></tr>
<tr><td>G3</td><td>9</td><td>z12</td><td>0</td><td colspan="2">K nasa</td></tr>
</tbody>
</table>
<div id="testblock" class="tester"></div>
<div id="testblock2" class="tester"></div>
</body>
</html>