mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 16:28:24 -04:00
Update error messages for validation-failed precompiled letters
This commit is contained in:
@@ -12,6 +12,6 @@
|
|||||||
Provided as PDF on {{ created_at|format_datetime_short }}
|
Provided as PDF on {{ created_at|format_datetime_short }}
|
||||||
</p>
|
</p>
|
||||||
<p class="notification-status-cancelled">
|
<p class="notification-status-cancelled">
|
||||||
Couldn’t read this file
|
Validation failed – this isn’t a PDF file that Notify can read
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% if is_precompiled_letter %}
|
{% if is_precompiled_letter %}
|
||||||
Provided as PDF, sent
|
Provided as PDF
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if help %}
|
{% if help %}
|
||||||
‘{{ template.name }}’
|
‘{{ template.name }}’
|
||||||
@@ -43,8 +43,7 @@
|
|||||||
</p>
|
</p>
|
||||||
{% elif notification_status == 'validation-failed' %}
|
{% elif notification_status == 'validation-failed' %}
|
||||||
<p class="notification-status-cancelled">
|
<p class="notification-status-cancelled">
|
||||||
Cancelled {{ updated_at|format_datetime_short }}
|
Validation failed – content is outside the printable area
|
||||||
(letter has content outside the printable area)
|
|
||||||
</p>
|
</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ def test_notification_page_shows_page_for_letter_notification(
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
'validation-failed',
|
'validation-failed',
|
||||||
'Cancelled 1 January at 1:02am (letter has content outside the printable area)',
|
'Validation failed – content is outside the printable area',
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
@freeze_time("2016-01-01 01:01")
|
@freeze_time("2016-01-01 01:01")
|
||||||
@@ -426,7 +426,7 @@ def test_notifification_page_shows_error_message_if_precompiled_letter_cannot_be
|
|||||||
)
|
)
|
||||||
|
|
||||||
error_message = page.find('p', class_='notification-status-cancelled').text
|
error_message = page.find('p', class_='notification-status-cancelled').text
|
||||||
assert normalize_spaces(error_message) == "Couldn’t read this file"
|
assert normalize_spaces(error_message) == "Validation failed – this isn’t a PDF file that Notify can read"
|
||||||
|
|
||||||
|
|
||||||
def test_should_404_for_unknown_extension(
|
def test_should_404_for_unknown_extension(
|
||||||
|
|||||||
Reference in New Issue
Block a user