From dc69fa5a904faeb935e26a8fe8e0f869180972ea Mon Sep 17 00:00:00 2001 From: David McDonald Date: Mon, 8 Feb 2021 22:27:21 +0000 Subject: [PATCH] Remove text about service is live or in trial mode This is not relevant for broadcast services. This information is given in the heading bar next to the service name. There is no process to request to go live and it is not necessary to tell you again that the service is live --- app/templates/views/service-settings.html | 50 +++++++++---------- tests/app/main/views/test_service_settings.py | 10 +--- 2 files changed, 26 insertions(+), 34 deletions(-) diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index 437c63237..26ab42a1a 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -266,43 +266,41 @@ {% endif %} - {% if current_service.trial_mode %} -

Your service is in trial mode

+ {% if not current_service.has_permission('broadcast')%} + {% if current_service.trial_mode %} +

Your service is in trial mode

- {% if not current_service.has_permission('broadcast') %} -

You can only:

+

You can only:

- - {% endif %} + -

- {% if current_user.has_permissions('manage_service') %} - To remove these restrictions, you can send us a - request to go live. - {% else %} - Your service manager can ask to have these restrictions removed. - {% endif %} -

+

+ {% if current_user.has_permissions('manage_service') %} + To remove these restrictions, you can send us a + request to go live. + {% else %} + Your service manager can ask to have these restrictions removed. + {% endif %} +

- {% else %} -

Your service is live

+ {% else %} +

Your service is live

- {% if not current_service.has_permission('broadcast') %}

You can send up to {{ "{:,}".format(current_service.message_limit) }} messages per day.

- {% endif %} -

- Problems or comments? - Give feedback. -

+

+ Problems or comments? + Give feedback. +

+ {% endif %} {% endif %} {% if current_user.platform_admin %} diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index e7c3f0d7c..078ff4ab7 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -613,14 +613,8 @@ def test_show_restricted_broadcast_service( service_id=SERVICE_ONE_ID, ) - assert page.select('main h2')[0].text == 'Your service is in trial mode' - - request_to_live = page.select_one('main p') - request_to_live_link = request_to_live.select_one('a') - assert normalize_spaces(page.select_one('main p').text) == ( - 'To remove these restrictions, you can send us a request to go live.' - ) - assert request_to_live_link['href'] == url_for('main.request_to_go_live', service_id=SERVICE_ONE_ID) + assert 'Your service is in trial mode' not in page.select('main')[0].text + assert 'To remove these restrictions, you can send us a request to go live' not in page.select('main')[0].text assert not page.select_one('main ul')