Hygiene: Organise change listeners

Move all of the change listeners into
resources/ext.popups/changeListeners and remove the ChangeListener
suffix. Also, do the above for the associated tests.

Bug: T152225
Change-Id: I90ada465ea291d601f8f1c5c6e775148a2100319
This commit is contained in:
Sam Smith 2016-12-05 12:38:00 +00:00
parent bbeb618e1d
commit 71b97cd089
11 changed files with 10 additions and 10 deletions

View file

@ -95,7 +95,7 @@ class PopupsHooks {
*/
public static function onResourceLoaderTestModules( array &$testModules, ResourceLoader &$resourceLoader ) {
$localBasePath = __DIR__;
$scripts = glob( "{$localBasePath}/tests/qunit/ext.popups/*.test.js" );
$scripts = glob( "{$localBasePath}/tests/qunit/ext.popups/{,**/}*.test.js", GLOB_BRACE );
$start = strlen( $localBasePath ) + 1;
$scripts = array_map( function ( $script ) use ( $start ) {

View file

@ -67,13 +67,13 @@
"resources/ext.popups/gateway.js",
"resources/ext.popups/reducers.js",
"resources/ext.popups/changeListener.js",
"resources/ext.popups/footerLinkChangeListener.js",
"resources/ext.popups/linkTitleChangeListener.js",
"resources/ext.popups/renderer.js",
"resources/ext.popups/renderChangeListener.js",
"resources/ext.popups/schema.js",
"resources/ext.popups/eventLoggingChangeListener.js",
"resources/ext.popups/previewCountChangeListener.js",
"resources/ext.popups/changeListeners/footerLink.js",
"resources/ext.popups/changeListeners/linkTitle.js",
"resources/ext.popups/changeListeners/render.js",
"resources/ext.popups/changeListeners/eventLogging.js",
"resources/ext.popups/changeListeners/previewCount.js",
"resources/ext.popups/boot.js"
],
"templates": {

View file

@ -2,7 +2,7 @@
// Since mw.popups.changeListeners.footerLink manipulates the DOM, this test
// is, by necessity, an integration test.
QUnit.module( 'ext.popups/footerLinkChangeListener @integration', {
QUnit.module( 'ext.popups/changeListeners/footerLink @integration', {
setup: function () {
var boundActions = {},
that = this;

View file

@ -2,7 +2,7 @@
// Since mw.popups.changeListeners.footerLink manipulates the DOM, this test
// is, by necessity, an integration test.
QUnit.module( 'ext.popups/footerLinkChangeListener @integration', {
QUnit.module( 'ext.popups/changeListeners/footerLink @integration', {
setup: function () {
var that = this;

View file

@ -1,6 +1,6 @@
( function ( mw, $ ) {
QUnit.module( 'ext.popups/previewCountChangeListener', {
QUnit.module( 'ext.popups/changeListeners/previewCount', {
setup: function () {
this.userSettings = {
setPreviewCount: this.sandbox.spy()

View file

@ -2,7 +2,7 @@
// Since mw.popups.changeListeners.render manipulates the DOM, this test is,
// by necessity, an integration test.
QUnit.module( 'ext.popups/renderChangeListener @integration' );
QUnit.module( 'ext.popups/changeListeners/render @integration' );
QUnit.test(
'it should call the showPreview action creator when the preview is shown',