mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 10:38:25 -04:00
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:
@@ -1,7 +1,7 @@
|
||||
<h1 h1 class="banner-title" data-module="track-error" data-error-type="letter-too-long" data-error-label="precompiled letter validation failed for service_id: {{ current_service.id }}">
|
||||
Your letter is too long
|
||||
</h1>
|
||||
<p>
|
||||
<p class="govuk-body">
|
||||
Letters must be {{ letter_max_pages }} pages or less ({{ letter_max_pages // 2 }} double-sided sheets of paper).
|
||||
<br>
|
||||
Your letter is {{ page_count }} pages long.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ message.title }}
|
||||
</h1>
|
||||
{% if message.detail %}
|
||||
<p>
|
||||
<p class="govuk-body">
|
||||
{{ message.detail | safe }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<h1 class='banner-title'>
|
||||
Message too long
|
||||
</h1>
|
||||
<p>
|
||||
<p class="govuk-body">
|
||||
Text messages cannot be longer than {{ SMS_CHAR_COUNT_LIMIT }} characters.
|
||||
Your message is {{ template.content_count }} characters.
|
||||
</p>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{{ 'es' if 'email address' == template_type_label else 's' }}
|
||||
{%- endif %}
|
||||
</h1>
|
||||
<p>
|
||||
<p class="govuk-body">
|
||||
In <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.trial_mode_new') }}">trial mode</a> you can only
|
||||
send to yourself and members of your team
|
||||
</p>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="File previously sent" data-error-label="{{ upload_id }}">
|
||||
These messages have already been sent today
|
||||
</h1>
|
||||
<p>
|
||||
<p class="govuk-body">
|
||||
If you need to resend them, rename the file and upload it again.
|
||||
</p>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Daily limit reached
|
||||
{% endif %}
|
||||
</h1>
|
||||
<p>
|
||||
<p class="govuk-body">
|
||||
You can only send {{ current_service.message_limit }} messages per day
|
||||
{%- if current_service.trial_mode %}
|
||||
in <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.trial_mode_new')}}">trial mode</a>
|
||||
@@ -13,7 +13,7 @@
|
||||
.
|
||||
</p>
|
||||
{% if original_file_name %}
|
||||
<p>
|
||||
<p class="govuk-body">
|
||||
{% if current_service.message_limit != remaining_messages %}
|
||||
You can still send {{ remaining_messages }} messages today, but
|
||||
{% endif %}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
You cannot send
|
||||
{{ 'this letter' if count_of_recipients == 1 else 'these letters' }}
|
||||
</h1>
|
||||
<p>
|
||||
<p class="govuk-body">
|
||||
In <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.trial_mode_new') }}">trial mode</a> you
|
||||
can only preview how your letters will look
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user