Page MenuHomePhabricator

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


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):

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

Event Timeline

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 Medium 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

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

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

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

Jdlrobson updated the task description. (Show Details)