From 48a49f24f00af1e7353c5daa8c93d585b84e8786 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Mon, 27 Apr 2020 10:27:43 +0100 Subject: [PATCH 1/3] Update utils to the latest version The validation for the text message character count has been updated from 612 to 918. The pricing page still needs to be updated. --- requirements-app.txt | 2 +- requirements.txt | 2 +- tests/app/main/views/test_send.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements-app.txt b/requirements-app.txt index 42fc82b9d..17b08111b 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -24,5 +24,5 @@ WTForms==2.2.1 # Pinned because of breaking change in 2.3.0 awscli-cwlogs>=1.4,<1.5 itsdangerous==1.1.0 -git+https://github.com/alphagov/notifications-utils.git@37.2.0#egg=notifications-utils==37.2.0 +git+https://github.com/alphagov/notifications-utils.git@37.3.0#egg=notifications-utils==37.3.0 git+https://github.com/alphagov/govuk-frontend-jinja.git@v0.5.1-alpha#egg=govuk-frontend-jinja==0.5.1-alpha diff --git a/requirements.txt b/requirements.txt index 1b74170b0..554278870 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ WTForms==2.2.1 # Pinned because of breaking change in 2.3.0 awscli-cwlogs>=1.4,<1.5 itsdangerous==1.1.0 -git+https://github.com/alphagov/notifications-utils.git@37.2.0#egg=notifications-utils==37.2.0 +git+https://github.com/alphagov/notifications-utils.git@37.3.0#egg=notifications-utils==37.3.0 git+https://github.com/alphagov/govuk-frontend-jinja.git@v0.5.1-alpha#egg=govuk-frontend-jinja==0.5.1-alpha ## The following requirements were added by pip freeze: diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index 89e851f11..bdb25c5e2 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -510,7 +510,7 @@ def test_upload_csv_file_with_very_long_placeholder_shows_check_page_with_errors mock_get_jobs, fake_uuid, ): - big_placeholder = ' '.join(['not ok'] * 102) + big_placeholder = ' '.join(['not ok'] * 402) mocker.patch( 'app.main.views.send.s3download', return_value=f""" @@ -4080,7 +4080,7 @@ TRIAL_MODE_MSG = ( 'Cannot send to this recipient when service is in trial mode – ' 'see https://www.notifications.service.gov.uk/trial-mode' ) -TOO_LONG_MSG = 'Text messages cannot be longer than 612 characters. Your message is 654 characters.' +TOO_LONG_MSG = 'Text messages cannot be longer than 918 characters. Your message is 954 characters.' SERVICE_DAILY_LIMIT_MSG = 'Exceeded send limits (1000) for today' @@ -4093,7 +4093,7 @@ SERVICE_DAILY_LIMIT_MSG = 'Exceeded send limits (1000) for today' ( TOO_LONG_MSG, 'Message too long', - 'Text messages cannot be longer than 612 characters. Your message is 654 characters.' + 'Text messages cannot be longer than 918 characters. Your message is 954 characters.' ), ( SERVICE_DAILY_LIMIT_MSG, @@ -4121,7 +4121,7 @@ def test_send_notification_shows_error_if_400( ) with client_request.session_transaction() as session: session['recipient'] = '07700900001' - session['placeholders'] = {'name': 'a' * 600} + session['placeholders'] = {'name': 'a' * 900} page = client_request.post( 'main.send_notification', From 8c7495ea45d98aa7c4d9de0338cf83914e09aab2 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Mon, 27 Apr 2020 10:49:23 +0100 Subject: [PATCH 2/3] Update the pricing page --- app/templates/views/pricing/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/templates/views/pricing/index.html b/app/templates/views/pricing/index.html index 49c85c61b..746731154 100644 --- a/app/templates/views/pricing/index.html +++ b/app/templates/views/pricing/index.html @@ -56,6 +56,8 @@ ('Up to 306 characters', '2 text messages'), ('Up to 459 characters', '3 text messages'), ('Up to 612 characters', '4 text messages'), + ('Up to 765 characters', '5 test messages'), + ('Up to 918 characters', '6 test messages'), ] %} {% call row() %} {{ text_field(message_length) }} From 347209f5c07a6fc8a8aad4f5d692d4a90069cd66 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Mon, 27 Apr 2020 13:52:37 +0100 Subject: [PATCH 3/3] Fix typo --- app/templates/views/pricing/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/views/pricing/index.html b/app/templates/views/pricing/index.html index 746731154..1eecf08c1 100644 --- a/app/templates/views/pricing/index.html +++ b/app/templates/views/pricing/index.html @@ -56,8 +56,8 @@ ('Up to 306 characters', '2 text messages'), ('Up to 459 characters', '3 text messages'), ('Up to 612 characters', '4 text messages'), - ('Up to 765 characters', '5 test messages'), - ('Up to 918 characters', '6 test messages'), + ('Up to 765 characters', '5 text messages'), + ('Up to 918 characters', '6 text messages'), ] %} {% call row() %} {{ text_field(message_length) }}