r105560 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105559‎ | r105560 | r105561 >
Date:16:27, 8 December 2011
Author:hashar
Status:resolved (Comments)
Tags:
Comment:
basic tests for bug 8115
Modified paths:
  • /trunk/phase3/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
@@ -486,4 +486,41 @@
487487
488488 });
489489
 490+var numbers = [
 491+ [ '12' ],
 492+ [ '7' ],
 493+ [ '13,000'],
 494+ [ '9' ],
 495+ [ '14' ],
 496+ [ '8.0' ],
 497+];
 498+var numbersAsc = [
 499+ [ '7' ],
 500+ [ '8.0' ],
 501+ [ '9' ],
 502+ [ '12' ],
 503+ [ '14' ],
 504+ [ '13,000'],
 505+];
 506+
 507+tableTest( 'bug 8115: sort numbers with commas (ascending)',
 508+ ['Numbers'], numbers, numbersAsc,
 509+ function( $table ) {
 510+ $table.tablesorter();
 511+ $table.find( '.headerSort:eq(0)' ).click();
 512+ }
 513+);
 514+
 515+alert( mw.config.get( "wgContentLanguage" ) );
 516+
 517+tableTest( 'bug 8115: sort numbers with commas (descending)',
 518+ ['Numbers'], numbers, reversed(numbersAsc),
 519+ function( $table ) {
 520+ $table.tablesorter();
 521+ $table.find( '.headerSort:eq(0)' ).click().click();
 522+ }
 523+);
 524+// TODO add numbers sorting tests for bug 8115 with a different language
 525+
 526+
490527 })();

Follow-up revisions

RevisionCommit summaryAuthorDate
r105622remove stray alert() from r105560 which popped up during test runs (bug 32884)brion23:57, 8 December 2011
r106295Remove stray trailing commas on last items in array literals -- this breaks I...brion00:38, 15 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86088Completely rewritten table sorting script....diebuche21:47, 14 April 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   23:56, 8 December 2011

there's an alert() here, which btw only seems to get 'null'.

#Comment by Brion VIBBER (talk | contribs)   23:57, 8 December 2011

rmeoved in r105622.

#Comment by Hashar (talk | contribs)   08:20, 9 December 2011

You will probably won't believe me if I tell you I did check r105560 for alert() and console() calls before committing :-D

Thanks for the cleanup Brion!

#Comment by Siebrand (talk | contribs)   00:01, 15 December 2011

Broke JS tests for IE[6789]. See http://toolserver.org/~krinkle/testswarm/user/MediaWiki/. Looks like r105974 fixed it for IE9, but not for IE[678].

#Comment by Brion VIBBER (talk | contribs)   00:36, 15 December 2011

It's the extra commas on the last items of the lists -- IE 6/7/8 don't like that. :)

Removing...

#Comment by Brion VIBBER (talk | contribs)   00:38, 15 December 2011

done in r106295.

Status & tagging log