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

Change subject: Fix the Qunit tests
......................................................................


Fix the Qunit tests

This is done by removing the wikibase.formatters.QuantityFormatter.tests
test module as the associated module has been removed with Ic28d1cb.
Furthermore the dependency on mediawiki.tests.qunit.testrunner has been
fixed (that module has been made a test only one in core with I21e69f5)

Change-Id: I4dbc078aff926748489a13d4a9e76f0991fce89c
---
M lib/WikibaseLib.hooks.php
M lib/resources/Resources.php
D lib/tests/qunit/formatters/QuantityFormatter.tests.js
3 files changed, 9 insertions(+), 73 deletions(-)

Approvals:
  Hoo man: Looks good to me, but someone else must approve
  WikidataJenkins: Verified
  Henning Snater: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 2cf5ab4..185d822 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -65,6 +65,15 @@
                        'remoteExtPath' => $remoteExtPathParts[1],
                );
 
+               $testModules['qunit']['wikibase.tests.qunit.testrunner'] = 
$moduleBase + array(
+                       'scripts' => 'tests/qunit/data/testrunner.js',
+                       'dependencies' => array(
+                               'test.mediawiki.qunit.testrunner',
+                               'wikibase',
+                       ),
+                       'position' => 'top'
+               );
+
                // TODO: Split into test modules per QUnit module.
                $testModules['qunit']['wikibase.tests'] = $moduleBase + array(
                        'scripts' => array(
@@ -203,21 +212,6 @@
                        ),
                        'dependencies' => array(
                                'jquery.wikibase.wbtooltip',
-                       ),
-               );
-
-               
$testModules['qunit']['wikibase.formatters.QuantityFormatter.tests'] = 
$moduleBase + array(
-                       'scripts' => array(
-                               'tests/qunit/wikibase.tests.js', // TODO: Move 
to own module along with testrunner dependency
-                               
'tests/qunit/formatters/QuantityFormatter.tests.js',
-                       ),
-                       'dependencies' => array(
-                               'dataValues.values',
-                               'valueFormatters.tests',
-                               'util.inherit',
-                               'valueFormatters',
-                               'wikibase.tests.qunit.testrunner',
-                               'wikibase.QuantityFormatter',
                        ),
                );
 
diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 2226720..1b20efa 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -407,15 +407,6 @@
                        )
                ),
 
-               'wikibase.tests.qunit.testrunner' => $moduleTemplate + array(
-                       'scripts' => '../tests/qunit/data/testrunner.js',
-                       'dependencies' => array(
-                               'mediawiki.tests.qunit.testrunner',
-                               'wikibase'
-                       ),
-                       'position' => 'top'
-               ),
-
                'wikibase.ui.Base' => $moduleTemplate + array(
                        'scripts' => array(
                                'wikibase.ui.js',
diff --git a/lib/tests/qunit/formatters/QuantityFormatter.tests.js 
b/lib/tests/qunit/formatters/QuantityFormatter.tests.js
deleted file mode 100644
index 9b19811..0000000
--- a/lib/tests/qunit/formatters/QuantityFormatter.tests.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * @licence GNU GPL v2+
- * @author H. Snater < [email protected] >
- */
-( function( wb, vf, dv, util ) {
-       'use strict';
-
-       var PARENT = vf.tests.ValueFormatterTest;
-
-       /**
-        * Constructor for creating a test object containing tests for the 
QuantityFormatter.
-        *
-        * @constructor
-        * @extends valueFormatters.tests.ValueFormatterTest
-        * @since 0.1
-        */
-       wb.tests.QuantityFormatterTest = util.inherit( PARENT, {
-
-               /**
-                * @see valueFormatters.tests.ValueFormatterTest.getConstructor
-                */
-               getConstructor: function() {
-                       return wb.formatters.QuantityFormatter;
-               },
-
-               /**
-                * @see 
valueFormatters.tests.ValueFormatterTest.getFormatArguments
-                */
-               getFormatArguments: function() {
-                       return [
-                               [
-                                       new dv.QuantityValue(
-                                               new dv.DecimalValue( 5 ),
-                                               'some unit',
-                                               new dv.DecimalValue( 6 ),
-                                               new dv.DecimalValue( 4 )
-                                       ),
-                                       '5±1some unit'
-                               ]
-                       ];
-               }
-
-       } );
-
-       var test = new wb.tests.QuantityFormatterTest();
-
-       test.runTests( 'wikibase.formatters.QuantityFormatter' );
-
-}( wikibase, valueFormatters, dataValues, util ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dbc078aff926748489a13d4a9e76f0991fce89c
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to