From a7f0e1e80aae7b93b5fa232a3a90b80b1d5b3e8c Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Sat, 10 Dec 2011 22:50:28 +0000 Subject: [PATCH] Add unit test for bug 32888 Follow up r105727 --- .../jquery/jquery.tablesorter.test.js | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) 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)' + ); +}); })(); -- 2.20.1