Page MenuHomePhabricator

Add test coverage for rlModuleLoader.js
Closed, ResolvedPublic3 Story Points

Description

Currently rlModuleLoader.js is our only non-View code which has no test coverage and this makes me a sad panda. This task aims to make this 100%.

The rlModuleLoader wraps mw.loader.using and shows a spinner overlay until the module has finished loading

Developer notes

Add test coverage for rlModuleLoader.js

Risks:
1 function with various different code paths with async behaviour (with reject/done resolution behaviour), 1 optional parameter, use of new keyword

Sign off steps

Coverage should be 100%. If not, please make a note on the table.

Event Timeline

Jdlrobson created this task.Nov 9 2018, 9:17 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 9 2018, 9:17 PM
Jdlrobson updated the task description. (Show Details)Nov 13 2018, 5:27 PM
Jdlrobson updated the task description. (Show Details)Nov 13 2018, 5:31 PM
Jdlrobson set the point value for this task to 3.
phuedx updated the task description. (Show Details)Nov 13 2018, 5:36 PM

Change 473943 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Add test coverage for rlModuleLoader.js

https://gerrit.wikimedia.org/r/473943

There was a conversation on https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/473943/ about changing the loadModule function. Let's see if we can do this as part of this task. If it proves more complicated and merits a new task, please flag!

the proposal is to make loadModule take a second parameter - a LoadingOverlay.

Change 473943 merged by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Add test coverage for rlModuleLoader.js

https://gerrit.wikimedia.org/r/473943

Change 474397 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Add assertions for resolved value of promises in rlModuleLoader.test.js

https://gerrit.wikimedia.org/r/474397

Change 474398 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Change/Deprecate rlModuleLoader params

https://gerrit.wikimedia.org/r/474398

Change 474397 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Add assertions for resolved value of promises in rlModuleLoader.test.js

https://gerrit.wikimedia.org/r/474397

Jdlrobson removed nray as the assignee of this task.Nov 20 2018, 6:10 PM
Jdlrobson added a subscriber: nray.
Jdlrobson closed this task as Resolved.Nov 21 2018, 12:12 AM
Jdlrobson claimed this task.
Jdlrobson updated the task description. (Show Details)