mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-01 04:09:46 -04:00
Merge pull request #3341 from alphagov/hide-postage-validation-failed
Don’t show the postage when validation has failed
This commit is contained in:
@@ -78,7 +78,10 @@ def view_notification(service_id, notification_id):
|
|||||||
page_count = get_page_count_for_letter(notification['template'], values=personalisation)
|
page_count = get_page_count_for_letter(notification['template'], values=personalisation)
|
||||||
|
|
||||||
if notification.get('postage'):
|
if notification.get('postage'):
|
||||||
notification['template']['postage'] = notification['postage']
|
if notification["status"] == "validation-failed":
|
||||||
|
notification['template']['postage'] = None
|
||||||
|
else:
|
||||||
|
notification['template']['postage'] = notification['postage']
|
||||||
template = get_template(
|
template = get_template(
|
||||||
notification['template'],
|
notification['template'],
|
||||||
current_service,
|
current_service,
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ def test_notification_page_shows_validation_failed_precompiled_letter(
|
|||||||
assert not page.select('p.notification-status')
|
assert not page.select('p.notification-status')
|
||||||
|
|
||||||
assert page.select_one('main img')['src'].endswith('.png?page=1')
|
assert page.select_one('main img')['src'].endswith('.png?page=1')
|
||||||
|
assert not page.select('.letter-postage')
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('notification_status, expected_message', (
|
@pytest.mark.parametrize('notification_status, expected_message', (
|
||||||
|
|||||||
Reference in New Issue
Block a user