diff --git a/app/templates/views/notifications/notification.html b/app/templates/views/notifications/notification.html
index c51ce0ce7..5b38752f5 100644
--- a/app/templates/views/notifications/notification.html
+++ b/app/templates/views/notifications/notification.html
@@ -52,9 +52,6 @@
{% else %}
{% if sent_with_test_key %}
-
- Postage: {{ postage }} class
-
{% if is_precompiled_letter %}
This letter passed our checks, but we will not print it because you used a test key.
@@ -68,9 +65,6 @@
{{ letter_print_day }}
-
- Postage: {{ postage }} class
-
Estimated delivery date: {{ estimated_letter_delivery_date|string|format_date_short }}
diff --git a/app/templates/views/templates/_template.html b/app/templates/views/templates/_template.html
index 6caed5ead..5eb968b3e 100644
--- a/app/templates/views/templates/_template.html
+++ b/app/templates/views/templates/_template.html
@@ -22,10 +22,6 @@
{% endif %}
-
-
Postage
:
- {{ template_postage or current_service.postage }} class
-
{% else %}
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}
diff --git a/tests/app/main/views/test_notifications.py b/tests/app/main/views/test_notifications.py
index 67db060d1..c003623d0 100644
--- a/tests/app/main/views/test_notifications.py
+++ b/tests/app/main/views/test_notifications.py
@@ -170,11 +170,15 @@ def test_notification_page_shows_page_for_letter_notification(
'Printing starts today at 5.30pm'
)
assert normalize_spaces(page.select('main p:nth-of-type(3)')[0].text) == (
- 'Postage: second class'
- )
- assert normalize_spaces(page.select('main p:nth-of-type(4)')[0].text) == (
'Estimated delivery date: 6 January'
)
+ assert len(page.select('.letter-postage')) == 1
+ assert normalize_spaces(page.select_one('.letter-postage').text) == (
+ 'Postage: second class'
+ )
+ assert page.select_one('.letter-postage')['class'] == [
+ 'letter-postage', 'letter-postage-second'
+ ]
assert page.select('p.notification-status') == []
letter_images = page.select('main img')
@@ -192,18 +196,18 @@ def test_notification_page_shows_page_for_letter_notification(
@freeze_time("2016-01-01 01:01")
-@pytest.mark.parametrize('is_precompiled_letter, expected_p1, expected_p2, expected_p3', (
+@pytest.mark.parametrize('is_precompiled_letter, expected_p1, expected_p2, expected_postage', (
(
True,
'Provided as PDF on 1 January at 1:01am',
- 'Postage: second class',
'This letter passed our checks, but we will not print it because you used a test key.',
+ 'Postage: second class'
),
(
False,
'‘sample template’ was sent on 1 January at 1:01am',
- 'Postage: second class',
'We will not print this letter because you used a test key.',
+ 'Postage: second class',
),
))
def test_notification_page_shows_page_for_letter_sent_with_test_key(
@@ -213,7 +217,7 @@ def test_notification_page_shows_page_for_letter_sent_with_test_key(
is_precompiled_letter,
expected_p1,
expected_p2,
- expected_p3,
+ expected_postage,
):
mocker.patch(
@@ -255,9 +259,9 @@ def test_notification_page_shows_page_for_letter_sent_with_test_key(
assert normalize_spaces(page.select('main p:nth-of-type(2)')[0].text) == (
expected_p2
)
- assert normalize_spaces(page.select('main p:nth-of-type(3)')[0].text) == (
- expected_p3
- )
+ assert normalize_spaces(
+ page.select_one('.letter-postage').text
+ ) == expected_postage
assert page.select('p.notification-status') == []
@@ -413,8 +417,13 @@ def test_notification_page_shows_page_for_first_class_letter_notification(
)
assert normalize_spaces(page.select('main p:nth-of-type(2)')[0].text) == 'Printing starts tomorrow at 5.30pm'
- assert normalize_spaces(page.select('main p:nth-of-type(3)')[0].text) == 'Postage: first class'
- assert normalize_spaces(page.select('main p:nth-of-type(4)')[0].text) == 'Estimated delivery date: 5 January'
+ assert normalize_spaces(page.select('main p:nth-of-type(3)')[0].text) == 'Estimated delivery date: 5 January'
+ assert normalize_spaces(page.select_one('.letter-postage').text) == (
+ 'Postage: first class'
+ )
+ assert page.select_one('.letter-postage')['class'] == [
+ 'letter-postage', 'letter-postage-first'
+ ]
@pytest.mark.parametrize('filetype', [
diff --git a/tests/app/main/views/test_templates.py b/tests/app/main/views/test_templates.py
index 71c3fca5b..49745d1a2 100644
--- a/tests/app/main/views/test_templates.py
+++ b/tests/app/main/views/test_templates.py
@@ -456,7 +456,7 @@ def test_view_letter_template_displays_postage(
template_id=fake_uuid,
)
- assert normalize_spaces(page.select_one('#postage').text) == expected_result
+ assert normalize_spaces(page.select_one('.letter-postage').text) == expected_result
def test_view_non_letter_template_does_not_display_postage(