Page MenuHomePhabricator

Remove all test templates
Open, Needs TriagePublic


As a developer,
I want to rely on my tests,
so that template changes in production templates are reflected in tests
and HTML changes do not affect my tests too much.

Acceptance Criteria:

  • /skins/test/templates folder is removed
  • all tests are green
  • DOM and JSON checks are used for checking for assigned variables. See UpdateAddressRouteTest::getDataApplicationVars for an example, the method may be moved into a helper class or the WebRouteTestCase class.
  • laika is the default skin for the test environment and all calls to change the skin to laika are removed

When we write the application we still had server-side rendering and the route tests used the skin test by default. The templates of the test skin made it easy to ensure that the controllers and presenter classes assigned the right key and values to the templates, without HTML getting in the way. With the laika skin with client-side rendering (Vue), we write all assigned values into a data attribute that gets picked up by the client-side code. In the route tests written after the introduction of laika, we can call $this->getDataApplicationVars() to get the data directly from the JSON data attribute. That's why all tests written after introducing the laika skin have a call in the test setup to set set laika as the default skin.

Event Timeline

Reopening because the task is a necessary prerequisite for T248460: Remove Twig templating engine