Page MenuHomePhabricator

Improve Javascript testing coverage in PageTriage
Closed, ResolvedPublic

Description

This is an epic to track the Moderator-Tools-Team work to improve testing coverage in Javascript files in the PageTriage extension. Subtasks will primarily be on a per-module basis.

Related Objects

StatusSubtypeAssignedTask
ResolvedSamwalton9-WMF
ResolvedSpikejsn.sherman
ResolvedSamwalton9-WMF
ResolvedSpikejsn.sherman
DuplicateNone
ResolvedBUG REPORTScardenasmolinar
ResolvedBUG REPORTScardenasmolinar
ResolvedBUG REPORTScardenasmolinar
ResolvedBUG REPORTScardenasmolinar
ResolvedBUG REPORTScardenasmolinar
ResolvedSpikejsn.sherman
ResolvedMPGuy2824
ResolvedBUG REPORTScardenasmolinar
ResolvedBUG REPORTjsn.sherman
ResolvedBUG REPORTScardenasmolinar
ResolvedBUG REPORTScardenasmolinar
ResolvedBUG REPORTjsn.sherman
ResolvedBUG REPORTjsn.sherman
ResolvedBUG REPORTjsn.sherman
ResolvedBUG REPORTjsn.sherman
ResolvedBUG REPORTjsn.sherman
ResolvedScardenasmolinar
ResolvedSpikeScardenasmolinar

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 910855 had a related patch set uploaded (by DannyS712; author: Novem Linguae):

[mediawiki/extensions/PageTriage@master] Add QUnit test for copypatrol URL

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

Change 910855 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] Add QUnit test for copypatrol URL

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

Coverage is now being logged and under 10%. I'm excited to see it improve as the codebase evolves! https://gerrit.wikimedia.org/r/918508

@Jdlrobson Is there a code coverage GUI somewhere to check out the front end coverage in detail? I found https://doc.wikimedia.org/cover-extensions/PageTriage/ but I think that's PHP only. Thanks for your work on this ticket.

I don't believe it's published anywhere right now but it can be.

If you run npm run jest it will create coverage/lcov-report/index.html
which you can open in your browser.

I think if you change the output directory to docs, and also add it to the npm run doc command it should appear magically at docs.wikimedia.org

Edit: You can use https://jestjs.io/docs/cli#--coveragedirectorypath to output coverage to the docs folder.

I don't believe it's published anywhere right now but it can be.

If you run npm run jest it will create coverage/lcov-report/index.html
which you can open in your browser.

I think if you change the output directory to docs, and also add it to the npm run doc command it should appear magically at docs.wikimedia.org

Edit: You can use https://jestjs.io/docs/cli#--coveragedirectorypath to output coverage to the docs folder.

If you do something like this patch to Popups you should be able to get the JS coverage report in SonarQube at https://sonarcloud.io/component_measures?id=mediawiki-extensions-PageTriage&metric=new_coverage&view=list

Samwalton9-WMF claimed this task.

Given that we're wrapping up our time dedicated on PageTriage, this tracking task is effectively resolved.