Collection phpunit tests are failing for table of contents when run locally
Closed, ResolvedPublic

Description

When run locally there are various test failures relating to the change in the book renderer to add a cover and table of contents.

Let's fix them.

Acceptance criteria

  • Fix/update tests for table of contents generation. Instead of testing the output of the HTML inside the template we will test the result of getBookTemplateData

Event Timeline

Change 383250 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Collection@master] Deal with cases where contributors and images are not defined

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

Change 383285 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Collection@master] Update test HTML hierarchy

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

Change 383286 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Collection@master] Update test mock to return license info

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

Change 383287 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Collection@master] Stop testing chapter generation in templates

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

Jdlrobson renamed this task from Collection phpunit tests fail when run locally to Collection phpunit tests are failing for table of contents when run locally.Oct 9 2017, 10:28 PM
Jdlrobson updated the task description. (Show Details)

Change 383250 merged by jenkins-bot:
[mediawiki/extensions/Collection@master] Deal with cases where contributors and images are not defined

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

Change 383285 merged by jenkins-bot:
[mediawiki/extensions/Collection@master] Update test HTML hierarchy

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

https://gerrit.wikimedia.org/r/383287 and https://gerrit.wikimedia.org/r/383286 will get the tests passing again. I'm working on tests for the uncovered functionality - TOC generation.

Change 383286 merged by jenkins-bot:
[mediawiki/extensions/Collection@master] Update test mock to return license info

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

https://gerrit.wikimedia.org/r/#/c/383287/ still needs review. This will unblock several tasks in blocked.

This comment was removed by phuedx.

Change 383287 merged by jenkins-bot:
[mediawiki/extensions/Collection@master] Stop testing render side effects

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

All of the associated changes have been merged.

This is a purely technical task. QA has been done as part of code review (and it mostly came down to checking whether or not the tests enabled in T177672: Collection tests do not run properly were passing).

phuedx claimed this task.
phuedx updated the task description. (Show Details)

Being bold. The tests are passing. Thanks, @Jdlrobson! 🎉🎉🎉