jenkins-bot has submitted this change and it was merged.

Change subject: Remove $wgJavaScriptTestConfig
......................................................................


Remove $wgJavaScriptTestConfig

The config variable itself and the documentation property were added
in MediaWiki 1.19 (r107919 / c447423593).

The testswarm-injectjs propert was added in MediaWiki 1.20 (5e590be3d6).

We never actually ended up using TestSwarm, and this variable
is not used anywhere I can see.

Having a configuration variable for a documentation page seems
odd. I can't find another instance of this. As it's tied to development
(not for users of the wiki), link to mediawiki.org direcly.

Change-Id: Ib16607683a293b6d6661ed0411dad9a3ff551a08
---
M RELEASE-NOTES-1.25
M includes/DefaultSettings.php
M includes/specials/SpecialJavaScriptTest.php
M tests/qunit/data/testrunner.js
4 files changed, 5 insertions(+), 44 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index ebe4a72..e8b1162 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -12,6 +12,7 @@
 * $wgPageShowWatchingUsers was removed.
 * $wgLocalVirtualHosts has been added to replace $wgConf->localVHosts.
 * $wgAntiLockFlags was removed.
+* $wgJavaScriptTestConfig was removed.
 * Edit tokens returned from User::getEditToken may change on every call. Token
   validity must be checked by passing the user-supplied token to
   User::matchEditToken rather than by testing for equality with a
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 4a6aa0b..4261c68 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5482,25 +5482,6 @@
 $wgEnableJavaScriptTest = false;
 
 /**
- * Configuration for javascript testing.
- */
-$wgJavaScriptTestConfig = array(
-       'qunit' => array(
-               // Page where documentation can be found relevant to the QUnit 
test suite being ran.
-               // Used in the intro paragraph on 
[[Special:JavaScriptTest/qunit]] for the
-               // documentation link in the "javascripttest-qunit-intro" 
message.
-               'documentation' => 
'//www.mediawiki.org/wiki/Manual:JavaScript_unit_testing',
-               // If you are submitting the QUnit test suite to a TestSwarm 
instance,
-               // point this to the "inject.js" script of that instance. This 
is was registers
-               // the QUnit hooks to extract the test results and push them 
back up into the
-               // TestSwarm database.
-               // @example 'http://localhost/testswarm/js/inject.js'
-               // @example '//integration.mediawiki.org/testswarm/js/inject.js'
-               'testswarm-injectjs' => false,
-       ),
-);
-
-/**
  * Overwrite the caching key prefix with custom value.
  * @since 1.19
  */
diff --git a/includes/specials/SpecialJavaScriptTest.php 
b/includes/specials/SpecialJavaScriptTest.php
index a61a673..65ddb31 100644
--- a/includes/specials/SpecialJavaScriptTest.php
+++ b/includes/specials/SpecialJavaScriptTest.php
@@ -135,14 +135,13 @@
         */
        private function initQUnitTesting() {
                $out = $this->getOutput();
-               $testConfig = $this->getConfig()->get( 'JavaScriptTestConfig' );
 
                $out->addModules( 'test.mediawiki.qunit.testrunner' );
                $qunitTestModules = 
$out->getResourceLoader()->getTestModuleNames( 'qunit' );
                $out->addModules( $qunitTestModules );
 
                $summary = $this->msg( 'javascripttest-qunit-intro' )
-                       ->params( $testConfig['qunit']['documentation'] )
+                       ->params( 
'https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing' )
                        ->parseAsBlock();
                $header = $this->msg( 'javascripttest-qunit-heading' 
)->escaped();
                $userDir = $this->getLanguage()->getDir();
@@ -160,16 +159,9 @@
                $out->addHtml( $this->wrapSummaryHtml( $summary, 
'frameworkfound' ) . $baseHtml );
 
                // This special page is disabled by default 
($wgEnableJavaScriptTest), and contains
-               // no sensitive data. In order to allow TestSwarm to embed it 
into a test client window,
+               // no sensitive data. In order to allow test frameworks to 
embed it into a test client window,
                // we need to allow iframing of this page.
                $out->allowClickjacking();
-
-               // Used in ./tests/qunit/data/testrunner.js, see also 
documentation of
-               // $wgJavaScriptTestConfig in DefaultSettings.php
-               $out->addJsConfigVars(
-                       'QUnitTestSwarmInjectJSPath',
-                       $testConfig['qunit']['testswarm-injectjs']
-               );
        }
 
        /**
diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js
index b800bc2..7294d62 100644
--- a/tests/qunit/data/testrunner.js
+++ b/tests/qunit/data/testrunner.js
@@ -30,27 +30,14 @@
        // and assuming failure.
        QUnit.config.testTimeout = 30 * 1000;
 
+       QUnit.config.requireExpects = true;
+
        // Add a checkbox to QUnit header to toggle MediaWiki ResourceLoader 
debug mode.
        QUnit.config.urlConfig.push( {
                id: 'debug',
                label: 'Enable ResourceLoaderDebug',
                tooltip: 'Enable debug mode in ResourceLoader'
        } );
-
-       QUnit.config.requireExpects = true;
-
-       /**
-        * Load TestSwarm agent
-        */
-       // Only if the current url indicates that there is a TestSwarm instance 
watching us
-       // (TestSwarm appends swarmURL to the test suites url it loads in 
iframes).
-       // Otherwise this is just a simple view of Special:JavaScriptTest/qunit 
directly,
-       // no point in loading inject.js in that case. Also, make sure that 
this instance
-       // of MediaWiki has actually been configured with the required url to 
that inject.js
-       // script. By default it is false.
-       if ( QUnit.urlParams.swarmURL && mw.config.get( 
'QUnitTestSwarmInjectJSPath' ) ) {
-               jQuery.getScript( QUnit.fixurl( mw.config.get( 
'QUnitTestSwarmInjectJSPath' ) ) );
-       }
 
        /**
         * CompletenessTest

-- 
To view, visit https://gerrit.wikimedia.org/r/180116
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib16607683a293b6d6661ed0411dad9a3ff551a08
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: TTO <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to