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

@@ -8,43 +8,43 @@
{% block content_column_content %}
<h1 class="heading heading-large">Emails</h1>
<p>Send an unlimited number of emails for free with GOV.UK Notify.</p>
<p class="govuk-body">Send an unlimited number of emails for free with GOV.UK Notify.</p>
{% if not current_user.is_authenticated %}
<p><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.register') }}">Create an account</a> and try Notify for yourself.</p>
<p class="govuk-body"><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.register') }}">Create an account</a> and try Notify for yourself.</p>
{% endif %}
<h2 class="heading heading-medium">Features</h2>
<p>Notify makes it easy to:</p>
<p class="govuk-body">Notify makes it easy to:</p>
<ul class="list list-bullet">
<li>create reusable email templates</li>
<li>personalise the content of your emails</li>
<li>send and schedule bulk messages</li>
</ul>
<p>You can also <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">integrate with our API</a> to send emails automatically.</p>
<p class="govuk-body">You can also <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">integrate with our API</a> to send emails automatically.</p>
<h3 class="heading heading-small" id="branding">Email branding</h3>
<p>Add your organisations logo and brand colour to email templates.</p>
<p>See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.branding_and_customisation', _anchor='email-branding') }}">how to change your email branding</a>.</p>
<p class="govuk-body">Add your organisations logo and brand colour to email templates.</p>
<p class="govuk-body">See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.branding_and_customisation', _anchor='email-branding') }}">how to change your email branding</a>.</p>
<h3 class="heading heading-small" id="send-files">Send files by email</h3>
<p>Notify offers a safe and reliable way to send files by email.</p>
<p>Upload a file using our API, then send your users an email with a link to download it.</p>
<p>Notify uses encrypted links instead of email attachments because:</p>
<p class="govuk-body">Notify offers a safe and reliable way to send files by email.</p>
<p class="govuk-body">Upload a file using our API, then send your users an email with a link to download it.</p>
<p class="govuk-body">Notify uses encrypted links instead of email attachments because:</p>
<ul class="list list-bullet">
<li>theyre more secure</li>
<!--<li>you can track when the recipient downloads your document</li>-->
<li>email attachments are often marked as spam</li>
</ul>
<p><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.support') }}">Contact us</a> if you want to send files by email.</p>
<p>Read our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">API documentation</a> for more information.</p>
<p class="govuk-body"><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.support') }}">Contact us</a> if you want to send files by email.</p>
<p class="govuk-body">Read our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">API documentation</a> for more information.</p>
<h3 class="heading heading-small" id="reply-to">Add a reply-to address</h3>
<p>Notify lets you choose the email address that users reply to.</p>
<p>Emails with a reply-to address seem more trustworthy and are less likely to be labelled as spam.</p>
<p>See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.branding_and_customisation', _anchor='reply-to-address') }}">how to add a reply-to address</a>.</p>
<p class="govuk-body">Notify lets you choose the email address that users reply to.</p>
<p class="govuk-body">Emails with a reply-to address seem more trustworthy and are less likely to be labelled as spam.</p>
<p class="govuk-body">See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.branding_and_customisation', _anchor='reply-to-address') }}">how to add a reply-to address</a>.</p>
<h2 class="heading heading-medium">Pricing</h2>
<p>Its free to send emails through Notify.</p>
<p><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.pricing') }}">See pricing</a> for more details.</p>
<p class="govuk-body">Its free to send emails through Notify.</p>
<p class="govuk-body"><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.pricing') }}">See pricing</a> for more details.</p>
{% endblock %}

View File

@@ -8,42 +8,42 @@
{% block content_column_content %}
<h1 class="heading heading-large">Letters</h1>
<p>GOV.UK Notify will print, pack and post your letters for you.</p>
<p class="govuk-body">GOV.UK Notify will print, pack and post your letters for you.</p>
{% if not current_user.is_authenticated %}
<p><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.register') }}">Create an account</a> and try Notify for yourself.</p>
<p class="govuk-body"><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.register') }}">Create an account</a> and try Notify for yourself.</p>
{% endif %}
<h2 class="heading heading-medium">Features</h2>
<p>Notify makes it easy to:</p>
<p class="govuk-body">Notify makes it easy to:</p>
<ul class="list list-bullet">
<li>create reusable letter templates</li>
<li>personalise the content of your letter</li>
<li>send bulk mail</li>
</ul>
<p>You can also <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">integrate with our API</a> to send letters automatically.</p>
<p class="govuk-body">You can also <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">integrate with our API</a> to send letters automatically.</p>
<h3 class="heading-small" id="postage">Choose your postage</h3>
<p>Notify can send letters by first or second class post.</p>
<p>First class letters are delivered one day after theyre dispatched. Second class letters are delivered 2 days after theyre dispatched.</p>
<p>Letters are printed at 5:30pm and dispatched the next working day (Monday to Friday). Royal Mail delivers from Monday to Saturday, excluding bank holidays.</p>
<p class="govuk-body">Notify can send letters by first or second class post.</p>
<p class="govuk-body">First class letters are delivered one day after theyre dispatched. Second class letters are delivered 2 days after theyre dispatched.</p>
<p class="govuk-body">Letters are printed at 5:30pm and dispatched the next working day (Monday to Friday). Royal Mail delivers from Monday to Saturday, excluding bank holidays.</p>
<h3 class="heading-small" id="branding">Branding</h3>
<p>Add your organisations logo to your letter templates.</p>
<p>See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.branding_and_customisation', _anchor='letter-branding') }}">how to change your letter branding</a>.</p>
<p class="govuk-body">Add your organisations logo to your letter templates.</p>
<p class="govuk-body">See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.branding_and_customisation', _anchor='letter-branding') }}">how to change your letter branding</a>.</p>
<h3 class="heading heading-small" id="upload-letters">Upload your own letters</h3>
<p>You can create reusable letter templates in Notify, or upload and send your own letters with the Notify API.</p>
<p>Read our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">documentation</a>.</p>
<p class="govuk-body">You can create reusable letter templates in Notify, or upload and send your own letters with the Notify API.</p>
<p class="govuk-body">Read our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">documentation</a>.</p>
<h2 class="heading heading-medium">Pricing</h2>
<p>It costs between 35p and 81p (plus VAT) to send a letter. Prices include:</p>
<p class="govuk-body">It costs between 35p and 81p (plus VAT) to send a letter. Prices include:</p>
<ul class="list list-bullet">
<li>paper</li>
<li>double-sided colour printing</li>
<li>C5 size envelopes with an address window</li>
<li>first or second class postage</li>
</ul>
<p>Letters can be up to 10 pages long (5 double-sided sheets of paper).</p>
<p><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.pricing') }}">See pricing</a> for more details.</p>
<p class="govuk-body">Letters can be up to 10 pages long (5 double-sided sheets of paper).</p>
<p class="govuk-body"><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.pricing') }}">See pricing</a> for more details.</p>
{% endblock %}

View File

@@ -8,34 +8,34 @@
{% block content_column_content %}
<h1 class="heading heading-large">Text messages</h1>
<p>Send thousands of free text messages to UK and international numbers with GOV.UK Notify.</p>
<p class="govuk-body">Send thousands of free text messages to UK and international numbers with GOV.UK Notify.</p>
{% if not current_user.is_authenticated %}
<p><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.register') }}">Create an account</a> and try Notify for yourself.</p>
<p class="govuk-body"><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.register') }}">Create an account</a> and try Notify for yourself.</p>
{% endif %}
<h2 class="heading heading-medium">Features</h2>
<p>Notify makes it easy to:</p>
<p class="govuk-body">Notify makes it easy to:</p>
<ul class="list list-bullet">
<li>create reusable text message templates</li>
<li>personalise the content of your texts</li>
<li>send and schedule bulk messages</li></ul>
<p>You can also <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">integrate with our API</a> to send text messages automatically.<p>
<p class="govuk-body">You can also <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.documentation') }}">integrate with our API</a> to send text messages automatically.<p class="govuk-body">
<h3 class="heading heading-small" id="receive">Receive text messages</h3>
<p>Let people send messages to your service or reply to your texts.</p>
<p>You can see and reply to the messages you receive when you sign in to Notify. If youre using our API, you can set up your own automated processes to manage replies.</p>
<p><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.support') }}">Contact us</a> to request a unique number for text message replies.</p>
<p class="govuk-body">Let people send messages to your service or reply to your texts.</p>
<p class="govuk-body">You can see and reply to the messages you receive when you sign in to Notify. If youre using our API, you can set up your own automated processes to manage replies.</p>
<p class="govuk-body"><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.support') }}">Contact us</a> to request a unique number for text message replies.</p>
<h3 class="heading heading-small" id="sender">Show people who your texts are from</h3>
<p>When you send a text message with Notify, the sender name tells people who it's from.</p>
<p>See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.branding_and_customisation', _anchor='text-message-sender') }}">how to change the text message sender</a>.</p>
<p class="govuk-body">When you send a text message with Notify, the sender name tells people who it's from.</p>
<p class="govuk-body">See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.branding_and_customisation', _anchor='text-message-sender') }}">how to change the text message sender</a>.</p>
<h2 class="heading heading-medium">Pricing<h2>
<p>Each service you add has a free annual allowance. After that it costs 1.58 pence (plus VAT) to send a text to a UK number.</p>
<p>The free allowance is:</p>
<p class="govuk-body">Each service you add has a free annual allowance. After that it costs 1.58 pence (plus VAT) to send a text to a UK number.</p>
<p class="govuk-body">The free allowance is:</p>
<ul class="list list-bullet">
<li>250,000 free text messages for central government services</li>
<li>25,000 free text messages for other public sector services</li></ul>
<p><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.pricing') }}">See pricing</a> for more details.</p>
<p class="govuk-body"><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.pricing') }}">See pricing</a> for more details.</p>
{% endblock %}