X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fmedia%2Funit_testing%2Ftests_onhold%2F1_dom%2F-complex_header.js;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fmedia%2Funit_testing%2Ftests_onhold%2F1_dom%2F-complex_header.js;h=fb173a785c9063dc6f0896c46ca0591e01cf2e29;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git diff --git a/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/-complex_header.js b/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/-complex_header.js new file mode 100755 index 0000000..fb173a7 --- /dev/null +++ b/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/-complex_header.js @@ -0,0 +1,52 @@ +// DATA_TEMPLATE: -complex_header +oTest.fnStart( "Complex header" ); + + +$(document).ready( function () { + $('#example').dataTable(); + + oTest.fnTest( + "Sorting on colspan has no effect", + function () { $('#example thead th:eq(1)').click(); }, + function () { return $('#example tbody tr td:eq(1)').html() == "Firefox 1.0"; } + ); + + oTest.fnTest( + "Sorting on non-unique TH and first TH has no effect", + function () { $('#example thead th:eq(2)').click(); }, + function () { return $('#example tbody tr td:eq(1)').html() == "Firefox 1.0"; } + ); + + oTest.fnTest( + "Sorting on non-unique TH and second TH will sort", + function () { $('#example thead th:eq(6)').click(); }, + function () { return $('#example tbody tr td:eq(4)').html() == "A"; } + ); + + oTest.fnTest( + "Sorting on non-unique TH and second TH will sort - reserve", + function () { $('#example thead th:eq(6)').click(); }, + function () { return $('#example tbody tr td:eq(4)').html() == "X"; } + ); + + oTest.fnTest( + "Sorting on unique TH will sort", + function () { $('#example thead th:eq(5)').click(); }, + function () { return $('#example tbody tr td:eq(3)').html() == "-"; } + ); + + oTest.fnTest( + "Sorting on unique TH will sort - reserve", + function () { $('#example thead th:eq(5)').click(); }, + function () { return $('#example tbody tr td:eq(3)').html() == "522.1"; } + ); + + oTest.fnTest( + "Sorting on unique rowspan TH will sort", + function () { $('#example thead th:eq(0)').click(); }, + function () { return $('#example tbody tr td:eq(0)').html() == "Gecko"; } + ); + + + oTest.fnComplete(); +} ); \ No newline at end of file