From: Derk-Jan Hartman Date: Sat, 10 Dec 2011 22:50:28 +0000 (+0000) Subject: Add unit test for bug 32888 X-Git-Tag: 1.31.0-rc.0~26096 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=a7f0e1e80aae7b93b5fa232a3a90b80b1d5b3e8c;p=lhc%2Fweb%2Fwiklou.git Add unit test for bug 32888 Follow up r105727 --- diff --git a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js index 41273a4365..a4fd82d530 100644 --- a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js @@ -520,5 +520,31 @@ tableTest( 'bug 8115: sort numbers with commas (descending)', ); // TODO add numbers sorting tests for bug 8115 with a different language +test( 'bug 32888 - Tables inside a tableheader cell', function() { + expect(2); + + var $table; + $table = $( + '' + + '' + + '' + + '' + + '
header'+ + '' + + '
12
A
B
' + ); + $table.tablesorter(); + + var test1 = equals( + $table.find('> thead:eq(0) > tr > th.headerSort').length, + 1, + 'Child tables inside a headercell should not interfere with sortable headers (bug 32888)' + ); + var test1 = equals( + $('#32888-2').find('th.headerSort').length, + 0, + 'The headers of child tables inside a headercell should not be sortable themselves (bug 32888)' + ); +}); })();