Page MenuHomePhabricator

Add test coverage for Button, Panel and Section
Closed, ResolvedPublic5 Story Points

Description

Several of our key components lack unit tests (currently 0% or close to that)

We'd like to add some coverage for these to understand problems we might encounter when writing unit tests for views.

Acceptance criteria

  • Button has code coverage (hopefully 100% coverage)
  • Panel has code coverage (hopefully 100% coverage)
  • Section has code coverage (hopefully 100% coverage)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 10 2018, 8:15 PM
Jdlrobson renamed this task from Add coverage for Button, Panel and Section to Add test coverage for Button, Panel and Section.Oct 17 2018, 10:08 PM
Jdlrobson triaged this task as High priority.Oct 18 2018, 8:29 PM
Jdlrobson set the point value for this task to 5.Oct 23 2018, 4:30 PM
Jdlrobson added subscribers: nray, pmiazga, Niedzielski.

Estimated by @nray @pmiazga, @Niedzielski and @Jdlrobson
This feels pretty green field and we'll want to work out some best practices going forward to testing views.

Change 472193 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Add tests for Button.js

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

Change 472197 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Add tests for Panel.js

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

Change 472198 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Add tests for Section.js

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

Change 472198 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Add tests for Section.js

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

Change 472193 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Add tests for Button.js

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

Change 472197 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Add tests for Panel.js

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

nray removed nray as the assignee of this task.Nov 9 2018, 4:32 PM

L49 of Panel remains untested ( !self.isVisible()), but this is due to https://phabricator.wikimedia.org/T209129

Jdlrobson closed this task as Resolved.Nov 13 2018, 6:36 PM
Jdlrobson updated the task description. (Show Details)