Index: branches/JSTesting/tests/qunit/QUnitTestResources.php |
— | — | @@ -12,12 +12,13 @@ |
13 | 13 | 'tests/qunit/suites/resources/jquery/jquery.client.test.js', |
14 | 14 | 'tests/qunit/suites/resources/jquery/jquery.colorUtil.test.js', |
15 | 15 | 'tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js', |
| 16 | + 'tests/qunit/suites/resources/jquery/jquery.highlightText.test.js', |
16 | 17 | 'tests/qunit/suites/resources/jquery/jquery.localize.test.js', |
17 | 18 | 'tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js', |
18 | 19 | 'tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js', |
19 | | - # jquery.tablesorter.test.js: Broken |
20 | | - #'tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js', // has mw-config def |
| 20 | + 'tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js', // has mw-config def |
21 | 21 | 'tests/qunit/suites/resources/jquery/jquery.textSelection.test.js', |
| 22 | + 'tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.test.js', |
22 | 23 | 'tests/qunit/suites/resources/mediawiki/mediawiki.test.js', |
23 | 24 | 'tests/qunit/suites/resources/mediawiki/mediawiki.title.test.js', // has mw-config def |
24 | 25 | 'tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js', |
— | — | @@ -28,8 +29,8 @@ |
29 | 30 | // This means the module overwrites/sets mw.config variables, reason being that |
30 | 31 | // the static /qunit/index.html has an empty mw.config since it's static. |
31 | 32 | // Until /qunit/index.html is fully replaceable and WMF's TestSwarm is up and running |
32 | | - // with Special:JavaScriptTest, untill it is important that tests do not depend on anything |
33 | | - // being in mw.config (not even wgServer). |
| 33 | + // with Special:JavaScriptTest - untill then, it is important that tests do not depend |
| 34 | + // on anything being in mw.config (not even wgServer). |
34 | 35 | ), |
35 | 36 | 'dependencies' => array( |
36 | 37 | 'jquery.autoEllipsis', |
— | — | @@ -38,6 +39,7 @@ |
39 | 40 | 'jquery.client', |
40 | 41 | 'jquery.colorUtil', |
41 | 42 | 'jquery.getAttrs', |
| 43 | + 'jquery.highlightText', |
42 | 44 | 'jquery.localize', |
43 | 45 | 'jquery.mwExtension', |
44 | 46 | 'jquery.tabIndex', |
Index: branches/JSTesting/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js |
— | — | @@ -6,6 +6,7 @@ |
7 | 7 | mw.config.set( 'wgMonthNames', ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']); |
8 | 8 | mw.config.set( 'wgMonthNamesShort', ['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']); |
9 | 9 | mw.config.set( 'wgDefaultDateFormat', 'dmy' ); |
| 10 | +mw.config.set( 'wgContentLanguage', 'en' ); |
10 | 11 | |
11 | 12 | test( '-- Initial check', function() { |
12 | 13 | expect(1); |
— | — | @@ -182,6 +183,7 @@ |
183 | 184 | function( $table ) { |
184 | 185 | // @fixme reset it at end or change module to allow us to override it |
185 | 186 | mw.config.set( 'wgDefaultDateFormat', 'dmy' ); |
| 187 | + mw.config.set( 'wgContentLanguage', 'de' ); |
186 | 188 | $table.tablesorter(); |
187 | 189 | $table.find( '.headerSort:eq(0)' ).click(); |
188 | 190 | } |
Index: branches/JSTesting/tests/qunit/suites/resources/mediawiki/mediawiki.test.js |
— | — | @@ -175,20 +175,20 @@ |
176 | 176 | |
177 | 177 | expect(2); |
178 | 178 | |
179 | | - var wgServer = mw.config.get( 'wgServer' ), |
| 179 | + var server = mw.config.get( 'wgServer' ), |
180 | 180 | basePath = mw.config.get( 'wgScriptPath' ); |
181 | 181 | |
182 | 182 | // From [[Special:JavaScriptTest]] we need to preprend the script path |
183 | 183 | // with the actual server (http://localhost/). |
184 | 184 | // Running from file tests/qunit/index.html, wgScriptPath is already |
185 | 185 | // including the wgServer part |
186 | | - if( wgServer !== null ) { |
187 | | - basePath = wgServer + wgScriptPath; |
| 186 | + if( server !== null ) { |
| 187 | + basePath = server + basePath; |
188 | 188 | } |
189 | 189 | // Forge an URL to the test callback script |
190 | 190 | var target = QUnit.fixurl( |
191 | 191 | basePath + '/tests/qunit/data/qunitOkCall.js' |
192 | | - ); |
| 192 | + ); |
193 | 193 | |
194 | 194 | // Confirm that mw.loader.load() works with protocol-relative URLs |
195 | 195 | target = target.replace( /https?:/, '' ); |
Index: branches/JSTesting/resources/Resources.php |
— | — | @@ -706,6 +706,8 @@ |
707 | 707 | 'dependencies' => array( |
708 | 708 | 'jquery.qunit', |
709 | 709 | 'jquery.qunit.completenessTest', |
| 710 | + 'mediawiki.page.startup', |
| 711 | + 'mediawiki.page.ready', |
710 | 712 | ), |
711 | 713 | 'position' => 'top', |
712 | 714 | ), |