From: Antoine Musso Date: Mon, 7 Nov 2011 17:48:42 +0000 (+0000) Subject: tests for bug 32047 / r102301 X-Git-Tag: 1.31.0-rc.0~26657 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=be89a3e81da100d2bc369f4a2badcc6c31c4881a;p=lhc%2Fweb%2Fwiklou.git tests for bug 32047 / r102301 In table with class="sortable", thead is before caption --- diff --git a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js index 72e587417d..0aa4c7941a 100644 --- a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js @@ -381,6 +381,33 @@ tableTest( } ); +/** FIXME: the diff output is not very readeable. */ +test( 'bug 32047 - caption must be before thead', function() { + var $table; + $table = $( + '' + + '' + + '' + + '' + + '' + + '' + + '
CAPTION
THEAD
A
B
TFOOT
' + ); + console.log( $table.html() ); + $table.tablesorter(); + console.log( $table.html() ); + var expected = + 'CAPTION'+ + '' + + 'THEAD' + + '' + + 'A' + + 'B' + + 'TFOOT' + + ''; + deepEqual( $table.html(), expected, ' must be placed before (bug 32047)' ); +}); + test( 'data-sort-value attribute, when available, should override sorting position', function() { var $table, data;