Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.test.js |
— | — | @@ -88,8 +88,10 @@ |
89 | 89 | + '</table>' |
90 | 90 | ); |
91 | 91 | |
92 | | - // Override wikitable padding for <td> |
93 | | - mw.util.addCSS( '#mw-mwutiltest-table tr td { padding:0 !important; }' ); |
| 92 | + mw.util.addCSS( |
| 93 | + '#mw-mwutiltest-table tr td { padding:0 !important; }' + // Override wikitable padding for <td> |
| 94 | + '.mw-mwutiltest-head:hover { cursor: pointer; } ' // Header-clicks hide/show the below rows |
| 95 | + ); |
94 | 96 | |
95 | 97 | mw.test.$table = $( 'table#mw-mwutiltest-table' ); |
96 | 98 | |
— | — | @@ -295,7 +297,7 @@ |
296 | 298 | 'true (boolean)' ); |
297 | 299 | mw.test.addTest( 'mw.util.validateEmail( "userfoo@ex-ample.org" )', |
298 | 300 | 'true (boolean)' ); |
299 | | - |
| 301 | + |
300 | 302 | // jQuery plugins |
301 | 303 | mw.test.addHead( 'jQuery plugins' ); |
302 | 304 | |
— | — | @@ -337,12 +339,12 @@ |
338 | 340 | if( item[0] == 'HEADER' ) { |
339 | 341 | |
340 | 342 | // update current header with its tests results |
341 | | - mw.test.$table.find( 'tr#mw-mwutiltest-head' + ( numberOfHeaders ) +' > th' ) |
| 343 | + mw.test.$table.find( 'tr#mw-mwutiltest-head' + numberOfHeaders +' > th' ) |
342 | 344 | .html( previousHeadTitle + ' <span style="float:right">(' |
343 | 345 | + 'T: ' + headNumberOfTests |
344 | 346 | + ' ok: ' + headNumberOfPasseds |
345 | 347 | + ' partial: ' + headNumberOfPartials |
346 | | - + ' err: ' + headNumberOfErrors |
| 348 | + + ' err: ' + headNumberOfErrors |
347 | 349 | + ')</span>' ); |
348 | 350 | |
349 | 351 | numberOfHeaders++; |
— | — | @@ -351,16 +353,16 @@ |
352 | 354 | headNumberOfPasseds = 0; |
353 | 355 | headNumberOfPartials = 0; |
354 | 356 | headNumberOfErrors = 0; |
355 | | - |
356 | | - previousHeadTitle = mw.test.addedTests[i][1]; |
357 | | - |
| 357 | + |
| 358 | + previousHeadTitle = item[1]; |
| 359 | + |
358 | 360 | return true; |
359 | 361 | } |
360 | 362 | |
361 | 363 | exec = item[0]; |
362 | 364 | shouldreturn = item[1]; |
363 | 365 | shouldcontain = item[2]; |
364 | | - |
| 366 | + |
365 | 367 | numberOfTests++; |
366 | 368 | headNumberOfTests++; |
367 | 369 | doesReturn = eval( exec ); |