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

@@ -13,7 +13,7 @@
Invoices
</h2>
<p>
<p class="govuk-body">
Well send your organisation an invoice each quarter if you:
</p>
@@ -22,15 +22,15 @@
<li>send letters</li>
</ul>
<p>
<p class="govuk-body">
If your organisation has more than one service, you'll see a breakdown of each service on your invoice.
</p>
<p>
<p class="govuk-body">
If the value of an invoice is less than £250 (before <abbr title="Value Added Tax">VAT</abbr>), well add it to the total for the next quarter to save time and effort.
</p>
<p>
<p class="govuk-body">
You can pay by BACS, debit card, or credit card.
</p>
@@ -38,19 +38,19 @@
Purchase orders
</h2>
<p>
<p class="govuk-body">
If your organisations estimated spend is more than £500 per quarter (before <abbr title="Value Added Tax">VAT</abbr>), you need to send us a purchase order (PO).
</p>
<p>
<p class="govuk-body">
Your organisation should raise a single <abbr title="purchase order">PO</abbr> for the estimated cost of all its services. You can update the PO anytime if your usage increases.
</p>
<p>
<p class="govuk-body">
You may need to set up the Cabinet Office as a supplier before you can raise a <abbr title="purchase order">PO</abbr>.
</p>
<p>
<p class="govuk-body">
<a class="govuk-link govuk-link--no-visited-state" href="{{ support_link }}">Contact us</a> if you need help raising a purchase order.
</p>

View File

@@ -11,14 +11,14 @@
{% block content_column_content %}
<h1 class="heading-large">Pricing</h1>
<p>To use GOV.UK Notify, theres:</p>
<p class="govuk-body">To use GOV.UK Notify, theres:</p>
<ul class="list list-bullet">
<li>no monthly charge</li>
<li>no setup fee</li>
<li>no procurement cost</li>
</ul>
<p>
<p class="govuk-body">
{% if not current_user.is_authenticated %}
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.register') }}">Create an account</a> then add as many different services as you need to.</p>
{% else %}
@@ -26,24 +26,24 @@
{% endif %}
</p>
<p>When you add a new service it will start in <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
<p class="govuk-body">When you add a new service it will start in <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
<h2 class="heading-medium" id="emails">Emails</h2>
<p>Its free to send emails through Notify.</p>
<p class="govuk-body">Its free to send emails through Notify.</p>
<h2 class="heading-medium" id="text-messages">Text messages</h2>
<p>Every service you add has an annual allowance of free text messages.</p>
<p>If your organisation has more than one service on Notify, they each have a separate allowance.</p>
<p>The allowance is:</p>
<p class="govuk-body">Every service you add has an annual allowance of free text messages.</p>
<p class="govuk-body">If your organisation has more than one service on Notify, they each have a separate allowance.</p>
<p class="govuk-body">The 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>It costs 1.58 pence (plus VAT) for each text message you send after you've used your free allowance.</p>
<p>See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.how_to_pay') }}">how to pay</a>.
<p class="govuk-body">It costs 1.58 pence (plus VAT) for each text message you send after you've used your free allowance.</p>
<p class="govuk-body">See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.how_to_pay') }}">how to pay</a>.
<h3 class="heading-small" id="long-text-messages">Long text messages</h3>
<p>If a text message is longer than 160 characters (including spaces), itll be charged as more than one message:</p>
<p class="govuk-body">If a text message is longer than 160 characters (including spaces), itll be charged as more than one message:</p>
<div class="bottom-gutter-3-2">
{% call mapping_table(
caption='Text message pricing',
@@ -67,9 +67,9 @@
{% endcall %}
</div>
<h3 class="heading-small" id="accents">Accents and accented characters</h3>
<p>Some languages, such as Welsh, use accented characters.</p>
<p>Text messages containing the following accented characters are charged at the normal rate: Ä, É, Ö, Ü, à, ä, é, è, ì, ò, ö, ù, ü.</p>
<p>Using other accented characters can increase the cost of sending text messages.<p>
<p class="govuk-body">Some languages, such as Welsh, use accented characters.</p>
<p class="govuk-body">Text messages containing the following accented characters are charged at the normal rate: Ä, É, Ö, Ü, à, ä, é, è, ì, ò, ö, ù, ü.</p>
<p class="govuk-body">Using other accented characters can increase the cost of sending text messages.<p class="govuk-body">
{% set accentedChars %}
<div class="bottom-gutter-3-2">
{% call mapping_table(
@@ -159,7 +159,7 @@
</div>
<h3 class="heading-small" id="international-numbers">Sending text messages to international numbers</h3>
<p>It might cost more to send text messages to international numbers than UK ones, depending on the country.</p>
<p class="govuk-body">It might cost more to send text messages to international numbers than UK ones, depending on the country.</p>
{% set smsIntRates %}
{{ live_search(target_selector='#international-pricing .table-row', show=True, form=search_form, label='Search by country name or code') }}
@@ -191,7 +191,7 @@
}) }}
<h2 class="heading-medium" id="letters">Letters</h2>
<p>The cost of sending a letter depends on the postage you choose and how many sheets of paper you need.</p>
<p class="govuk-body">The cost of sending a letter depends on the postage you choose and how many sheets of paper you need.</p>
<div>
{% call mapping_table(
@@ -216,9 +216,9 @@
{% endcall %}
</div>
<div class="panel panel-border-wide">
<p>These prices were updated on 1 October 2019.</p>
<p class="govuk-body">These prices were updated on 1 October 2019.</p>
</div>
<p>Prices include:</p>
<p class="govuk-body">Prices include:</p>
<ul class="list list-bullet">
<li>paper</li>
<li>double-sided colour printing</li>