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

@@ -15,21 +15,21 @@
)}}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<p>
<p class="govuk-body">
First, check the
<a class="govuk-link govuk-link--no-visited-state" href="https://status.notifications.service.gov.uk">system status page</a>.
You do not need to contact us if
the problem youre having is listed on that page.
</p>
<p>
<p class="govuk-body">
Otherwise, contact us using the emergency email address we
gave you or your service manager when we made your service live.
</p>
<p>
<p class="govuk-body">
Well reply within 30 minutes and give you hourly updates
until the problems fixed.
</p>
<p>
<p class="govuk-body">
We do not offer out of hours support if your service is in
trial mode.
</p>

View File

@@ -19,7 +19,7 @@
<div class="govuk-grid-column-two-thirds">
{% if show_status_page_banner %}
<div class="panel panel-border-wide">
<p>
<p class="govuk-body">
Check our <a class="govuk-link govuk-link--no-visited-state" href="https://status.notifications.service.gov.uk">system status</a>
page to see if there are any known issues with GOV.UK Notify.
</p>
@@ -31,7 +31,7 @@
{{ textbox(form.name, width='1-1') }}
{{ textbox(form.email_address, width='1-1') }}
{% else %}
<p>Well reply to {{ current_user.email_address }}</p>
<p class="govuk-body">Well reply to {{ current_user.email_address }}</p>
{% endif %}
{{ sticky_page_footer('Send') }}
{% endcall %}

View File

@@ -10,7 +10,7 @@
{% block maincolumn_content %}
<h1 class="heading-large">Support</h1>
<p>We provide 24-hour online support for teams with a live service on GOV.UK&nbsp;Notify.</p>
<p class="govuk-body">We provide 24-hour online support for teams with a live service on GOV.UK&nbsp;Notify.</p>
{% call form_wrapper() %}
{% if current_user.is_authenticated %}
@@ -24,19 +24,19 @@
{{ page_footer('Continue') }}
{% endcall %}
<p>You can also <a class="govuk-link govuk-link--no-visited-state" href="https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC">contact us on Slack</a>.</p>
<p class="govuk-body">You can also <a class="govuk-link govuk-link--no-visited-state" href="https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC">contact us on Slack</a>.</p>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h2 class="heading-medium">Office hours</h2>
<p>Our office hours are 9:30am to 5:30pm, Monday to Friday.</p>
<p>When you report a problem in office hours, well aim to read it within 30 minutes and reply within one working day.</p>
<p class="govuk-body">Our office hours are 9:30am to 5:30pm, Monday to Friday.</p>
<p class="govuk-body">When you report a problem in office hours, well aim to read it within 30 minutes and reply within one working day.</p>
<h2 class="heading-medium">Out-of-hours</h2>
<p>Outside office hours, response times depend on whether youre reporting an emergency.</p>
<p>If its an emergency, well reply within 30 minutes and update you every hour until the problems fixed.</p>
<p>If your problem is not an emergency, well reply within one working day.</p>
<p>A problem is only classed as an emergency if:</p>
<p class="govuk-body">Outside office hours, response times depend on whether youre reporting an emergency.</p>
<p class="govuk-body">If its an emergency, well reply within 30 minutes and update you every hour until the problems fixed.</p>
<p class="govuk-body">If your problem is not an emergency, well reply within one working day.</p>
<p class="govuk-body">A problem is only classed as an emergency if:</p>
<ul class="list list-bullet">
<li>nobody on your team can sign in</li>
<li>a technical difficulties error appears when you try to upload a file</li>

View File

@@ -13,7 +13,7 @@
'Thanks for contacting us',
back_link=url_for('.support')
) }}
<p>
<p class="govuk-body">
{% if out_of_hours_emergency %}
Well reply in the next 30 minutes.
{% else %}