Description
User Story - Business Need
- Ticket is understood, and QA has been contacted (if the ticket has a QA label).
User Story(ies)
As a Notify front- or back-end developer,
I want a comprehensive repository of templates (expressed as markdown) and the html and plain text message body that should result from the templates
So that we avoid regressions when updating Mistune, implementing new features, etc.
Additional Info and Resources
This is a follow-on to #198, which created markdown templates and expected translations to html or plain text. This ticket builds on that work by addressing placeholder substitution.
Using new or previously created markdown templates, create unit tests for correct placeholder substitution. For example, substitutions can be lists. Can they be lists of lists? What should happen if a list value is substituted into a block quote?
In the existing code, content and personalizations are turned into a message body (html or plain text) by calling the str
function on one of the various template classes in template.py. This is overly complicated, restrictive, brittle, and likely to be refactored significantly. Work for this ticket should not assume anything about the final implementation.
For now, it is acceptable to create a skipped unit test stub for which the name and doc string explain what is being tested.
Engineering Checklist
-
Stubbedunit tests for substitution created
Acceptance Criteria
- This work is added to the sprint review slide deck (key win bullet point and demo slide)
QA Considerations
- QA concurs that the templates cover the minimum set of markdown features expected to work
- QA concurs that stubbed unit tests represent adequate test coverage
Activity