Page MenuHomePhabricator

Migrate test_View.js to tests/node-qunit/mobile.startup
Closed, ResolvedPublic2 Story Points

Description

View.js has already been migrated to webpack's control via T203100, but its associated tests proved to be challenging to migrate due to tight coupling with dependencies ( e.g. jQuery) and a lot of stubbing in its place. It was thus decided to leave its test file as is and migrate it in a future card (this one).

To review the work already done on this, see (and feel free to abandon): https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/458883/

A discussion needs to be had on how much stubbing / spying we feel comfortable with on this.

Acceptance criteria

  • test_View.js is migrated to tests/node-qunit/mobile.startup and can be run from headless qunit
  • Revise/move/remove any tests that don't test View's responsibility. Note: some tests feel like they test the functionality of mfExtend more than they test View's code

Note: Adding additional test coverage is out of scope and will be added separately.

Sign off steps

Details

Related Gerrit Patches:
mediawiki/extensions/MobileFrontend : masterRemove redundant View tests
mediawiki/extensions/MobileFrontend : masterHygiene: enable headless View tests

Event Timeline

nray created this task.Sep 18 2018, 11:40 PM
Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald TranscriptSep 18 2018, 11:40 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdlrobson triaged this task as Normal priority.Sep 19 2018, 4:24 PM
Jdlrobson added a subscriber: Jdlrobson.

I subject we'll be able to port this soon.

ovasileva set the point value for this task to 2.Sep 26 2018, 4:11 PM

Change 463845 had a related patch set uploaded (by Niedzielski; owner: Stephen Niedzielski):
[mediawiki/extensions/MobileFrontend@master] Hygiene: enable headless View tests

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

Change 464726 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Remove redundant View tests

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

Change 463845 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Hygiene: enable headless View tests

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

Jdlrobson updated the task description. (Show Details)Oct 5 2018, 6:10 PM
Jdlrobson assigned this task to nray.Oct 8 2018, 5:17 PM
nray removed nray as the assignee of this task.Oct 8 2018, 6:11 PM

Moving this to Ready for Signoff as it only involved changes to test code.

Change 464726 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Remove redundant View tests

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

Jdlrobson closed this task as Resolved.Oct 10 2018, 6:04 PM
Jdlrobson updated the task description. (Show Details)