-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tests for '{% call %}' use case for components that support it #510
Comments
I've spiked this out: https://github.com/alphagov/govuk-frontend/compare/spike-expose-caller-in-review?expand=1 You can see in the current way our application is structure it results in duplication of logic in three places. I'd recommend we refactor app.js to remove complex data 'setting' in templates, and instead keep data at the top level passed down to templates. Then share the rendering of components between the HTML Code examples, the iFrame preview and the test render helper. |
As long as we have test coverage, I don't think we need to have examples in the review app, as neither the generated HTML nor the styling should differ from any other example. So I'd suggest scoping this to just making sure we have tests that cover the |
This has been implemented |
Some of our components allow nesting using https://mozilla.github.io/nunjucks/templating.html#call.
We currently can't show this in the guide or tests, so this functionality could break.
For example #509 we do not have coverage for 'caller'
We would need to
The text was updated successfully, but these errors were encountered: