Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Content/jQuery/jQueryPlugins/DataTables-1.7.6/media/unit_testing/tests_onhold/1_dom/-complex_header.js @ 6286

Last change on this file since 6286 was 6286, checked in by dkahn, 13 years ago

#1198 Added jQuery plus plugins

File size: 1.6 KB
Line 
1// DATA_TEMPLATE: -complex_header
2oTest.fnStart( "Complex header" );
3
4
5$(document).ready( function () {
6  $('#example').dataTable();
7 
8  oTest.fnTest(
9    "Sorting on colspan has no effect",
10    function () { $('#example thead th:eq(1)').click(); },
11    function () { return $('#example tbody tr td:eq(1)').html() == "Firefox 1.0"; }
12  );
13 
14  oTest.fnTest(
15    "Sorting on non-unique TH and first TH has no effect",
16    function () { $('#example thead th:eq(2)').click(); },
17    function () { return $('#example tbody tr td:eq(1)').html() == "Firefox 1.0"; }
18  );
19 
20  oTest.fnTest(
21    "Sorting on non-unique TH and second TH will not sort",
22    function () { $('#example thead th:eq(6)').click(); },
23    function () { return $('#example tbody tr td:eq(4)').html() == "A"; }
24  );
25 
26  oTest.fnTest(
27    "Sorting on non-unique TH and second TH will not sort - reserve",
28    function () { $('#example thead th:eq(6)').click(); },
29    function () { return $('#example tbody tr td:eq(4)').html() == "A"; }
30  );
31 
32  oTest.fnTest(
33    "Sorting on unique TH will sort",
34    function () { $('#example thead th:eq(5)').click(); },
35    function () { return $('#example tbody tr td:eq(3)').html() == "-"; }
36  );
37 
38  oTest.fnTest(
39    "Sorting on unique TH will sort - reserve",
40    function () { $('#example thead th:eq(5)').click(); },
41    function () { return $('#example tbody tr td:eq(3)').html() == "522.1"; }
42  );
43 
44  oTest.fnTest(
45    "Sorting on unique rowspan TH will sort",
46    function () { $('#example thead th:eq(0)').click(); },
47    function () { return $('#example tbody tr td:eq(0)').html() == "Gecko"; }
48  );
49 
50 
51  oTest.fnComplete();
52} );
Note: See TracBrowser for help on using the repository browser.