Page MenuHomePhabricator

Rewrite CategoryOverlay using composition, adding tests
Closed, DuplicatePublic

Description

We will rewrite the CategoryOverlay and related components to use composition rather than inheritance. While doing so we will add tests. This will give us much needed information on how to improve all our overlays going forward, while providing some much needed maintenance to the category overlay.

Understandably given the process with which the feature got made, the existing category feature in beta has no unit tests or browser tests. This is a prerequisite for putting any code to stable where we need to maintain it for millions of users and having confidence that it is serving there needs. Note that the redesign of categories may remove the need for some of these tests.

AC

  • browser test for adding a category
  • browser test for viewing list of categories
  • browser test for tabbing between views and displaying hidden categories
  • browser test for clicking to view a category
  • unit tests for CategoryLookupInputWidget
  • unit test for CategoryGateway
  • test covering infinite scroll behaviour

Event Timeline

We've had a category related regression - T162922 - tests would have protected against this. This is a blocker for pushing this code to stable.

Would there be a need for tests if MobileFrontend just showed category the same way the normal skin does?

Jdlrobson lowered the priority of this task from Medium to Low.May 25 2017, 4:15 PM

Would there be a need for tests if MobileFrontend just showed category the same way the normal skin does?

The category HTML are purposely not rendered at the bottom of the skin for the same reason we do not render the list of languages - performance (html bytes) and non mobile friendly (touch areas/position)

Jdlrobson renamed this task from Category feature has no tests to Rewrite CategoryOverlay using composition, adding tests.Mar 19 2018, 11:38 PM
Jdlrobson raised the priority of this task from Low to Medium.
Jdlrobson updated the task description. (Show Details)