mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
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:
parent
bbeb618e1d
commit
71b97cd089
|
@ -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 ) {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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;
|
|
@ -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;
|
||||
|
|
@ -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()
|
|
@ -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',
|
Loading…
Reference in a new issue