Page MenuHomePhabricator

Add tests that assert that template only uses template data from associated component
Open, HighPublic3 Estimated Story Points


NOTE: follow up work to T351141. Not doing this adds risk of visual regressions as the skin design evolves. NOTE: This task should be timeboxed to 2 days.

The UserLinks template is associated with the VectorUserLinks component. It references a template data property "data-client-prefs-dropdown" that does ot exist in VectorComponentUserLinks::getTemplateData.

This is problematic because if that template property is ever removed, or moved, the template will render something different (e.g. break) and we will not know about it until it is flagged by a Pixel regression test (if one exists).

We should explore a test-based approach to detect this situation and throw an error when found.

Possible ideas:


  • A way to associate a template with a component e.g. a public template property or consider standardizing our template names e.g. name must match.

Event Timeline

Jdlrobson added subscribers: Jdrewniak, bwang.
Jdlrobson added a subscriber: Mabualruz.
Jdlrobson set the point value for this task to 3.