From be89a3e81da100d2bc369f4a2badcc6c31c4881a Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 7 Nov 2011 17:48:42 +0000 Subject: [PATCH] tests for bug 32047 / r102301 In table with class="sortable", thead is before caption --- .../jquery/jquery.tablesorter.test.js | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) 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; -- 2.20.1