Don’t allow paragraphs without class attribute

All paragraphs should have class="govuk-body", or be otherwise
custom-styled. This commit adds some extra checks to our test fixture
that looks for paragraphs that don’t have any styling. Our test coverage
is pretty good, so this should check almost all pages, and prevent
regressions.

I’ve done this in such a way that it can be extended for other elements
(e.g. links) in the future.
This commit is contained in:
Chris Hill-Scott
2020-05-29 17:11:01 +01:00
parent 82ec03e263
commit 4df99bd27f
134 changed files with 517 additions and 497 deletions

View File

@@ -249,7 +249,7 @@
{% if current_service.trial_mode %}
<h2 class="heading-medium top-gutter-0">Your service is in trial mode</h2>
<p>You can only:</p>
<p class="govuk-body">You can only:</p>
<ul class='list list-bullet'>
<li>send {{ current_service.message_limit }} text messages and emails per day</li>
@@ -257,24 +257,24 @@
<li>create letter templates, but not send them</li>
</ul>
<p>
<p class="govuk-body">
{% if current_user.has_permissions('manage_service') %}
To remove these restrictions, you can send us a
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">request to go live</a>.
{% else %}
Your service manager can ask to have these restrictions removed.
{% endif %}
</p>
</p>
{% else %}
<h2 class="heading-medium top-gutter-0">Your service is live</h2>
<p>
<p class="govuk-body">
You can send up to
{{ "{:,}".format(current_service.message_limit) }} messages
per day.
</p>
<p>
<p class="govuk-body">
Problems or comments?
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">Give feedback</a>.
</p>
@@ -386,7 +386,7 @@
</p>
{% endif %}
{% if (not current_service.active) and current_user.platform_admin %}
<p>
<p class="govuk-body">
<div class="hint bottom-gutter-1-2">
Service suspended
</div>