From a2c6c2f08cdd8671f87dfed70b17a5632c22d376 Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Thu, 13 Oct 2022 20:51:45 +0000 Subject: [PATCH 1/5] remove letters from dashboard --- app/templates/main_nav.html | 2 +- app/templates/views/dashboard/_totals.html | 8 ++++---- app/templates/views/dashboard/_usage.html | 8 ++++---- .../organisations/organisation/index.html | 8 ++++---- app/templates/views/service-settings.html | 4 ++-- app/templates/views/usage.html | 20 +++++++++---------- tests/app/main/test_permissions.py | 2 -- tests/app/test_navigation.py | 6 +++--- 8 files changed, 28 insertions(+), 30 deletions(-) diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index a7e0e032a..193e308f8 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -16,7 +16,7 @@
  • Sent messages
  • {% endif %} {% if not current_service.has_permission('broadcast') %} -
  • Letters
  • + {% endif %}
  • Team members
  • {% if current_user.has_permissions('manage_service', allow_org_user=True) and not current_service.has_permission('broadcast') %} diff --git a/app/templates/views/dashboard/_totals.html b/app/templates/views/dashboard/_totals.html index d1528729b..8aaefd124 100644 --- a/app/templates/views/dashboard/_totals.html +++ b/app/templates/views/dashboard/_totals.html @@ -2,7 +2,7 @@
    -
    +
    {{ big_number_with_status( statistics['email']['requested'], statistics['email']['requested']|message_count_label('email', suffix='sent'), @@ -14,7 +14,7 @@ smaller=True, ) }}
    -
    +
    {{ big_number_with_status( statistics['sms']['requested'], statistics['sms']['requested']|message_count_label('sms', suffix='sent'), @@ -26,7 +26,7 @@ smaller=True, ) }}
    -
    +
    diff --git a/app/templates/views/dashboard/_usage.html b/app/templates/views/dashboard/_usage.html index 4046e6c91..af8e39919 100644 --- a/app/templates/views/dashboard/_usage.html +++ b/app/templates/views/dashboard/_usage.html @@ -1,12 +1,12 @@ {% from "components/big-number.html" import big_number %}
    -
    +
    {{ big_number("Unlimited", 'free email allowance', smaller=True) }}
    -
    +
    {% if sms_cost %} {{ big_number( @@ -20,7 +20,7 @@ {% endif %}
    -
    +
    diff --git a/app/templates/views/organisations/organisation/index.html b/app/templates/views/organisations/organisation/index.html index 7b9d89c9f..7fabec5d1 100644 --- a/app/templates/views/organisations/organisation/index.html +++ b/app/templates/views/organisations/organisation/index.html @@ -70,14 +70,14 @@ {{ service.service_name }}
    -
    +
    {{ big_number( service.emails_sent, label=service.emails_sent|message_count_label('email'), smallest=True ) }}
    -
    +
    {% if service.sms_cost %} {{ big_number( service.sms_cost, @@ -93,14 +93,14 @@ ) }} {% endif %}
    -
    +
    {% endfor %} diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index d7ade8672..f89dfbe9c 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -201,7 +201,7 @@ {% endcall %} - {% call mapping_table( + {% endif %}
    diff --git a/app/templates/views/usage.html b/app/templates/views/usage.html index 4bd7f6c77..b31f05c61 100644 --- a/app/templates/views/usage.html +++ b/app/templates/views/usage.html @@ -18,14 +18,14 @@
    -
    +

    Emails

    {{ big_number(emails_sent, 'sent', smaller=True) }} {{ big_number("Unlimited", 'free allowance', smaller=True) }}
    -
    +

    Text messages

    {{ big_number(sms_sent, 'sent', smaller=True) }} @@ -44,21 +44,21 @@ {% endfor %}
    -
    +
    -
    +
     
    -
    +
    {{ big_number( sms_cost, @@ -68,7 +68,7 @@ ) }}
    -
    +
    @@ -111,12 +111,12 @@
  • {{ sms.charged_units|message_count('sms') }} at {{- ' {:.2f}p'.format(sms.rate * 100) }}
  • {% endfor %} - {% for letter in item.letter_breakdown %} + {% if not (item.sms_free_allowance_used or item.sms_cost or item.letter_breakdown) %} {% endif %} diff --git a/tests/app/main/test_permissions.py b/tests/app/main/test_permissions.py index 426405650..7b4a12f09 100644 --- a/tests/app/main/test_permissions.py +++ b/tests/app/main/test_permissions.py @@ -126,7 +126,6 @@ def test_service_navigation_for_org_user( ( 'Send messages', 'Sent messages', - 'Letters', 'Team members', ), 403, @@ -136,7 +135,6 @@ def test_service_navigation_for_org_user( ( 'Send messages', 'Sent messages', - 'Letters', 'Team members', 'Usage', ), diff --git a/tests/app/test_navigation.py b/tests/app/test_navigation.py index bd4757373..adf8708e3 100644 --- a/tests/app/test_navigation.py +++ b/tests/app/test_navigation.py @@ -514,7 +514,7 @@ def test_navigation_urls( ] == [ '/services/{}'.format(SERVICE_ONE_ID), '/services/{}/templates'.format(SERVICE_ONE_ID), - '/services/{}/uploads'.format(SERVICE_ONE_ID), + # '/services/{}/uploads'.format(SERVICE_ONE_ID), '/services/{}/users'.format(SERVICE_ONE_ID), '/services/{}/usage'.format(SERVICE_ONE_ID), '/services/{}/service-settings'.format(SERVICE_ONE_ID), @@ -593,7 +593,7 @@ def test_caseworkers_get_caseworking_navigation( ) page = client_request.get('main.choose_template', service_id=SERVICE_ONE_ID) assert normalize_spaces(page.select_one('header + .govuk-width-container nav').text) == ( - 'Send messages Sent messages Letters Team members' + 'Send messages Sent messages Team members' ) @@ -612,5 +612,5 @@ def test_caseworkers_see_jobs_nav_if_jobs_exist( ) page = client_request.get('main.choose_template', service_id=SERVICE_ONE_ID) assert normalize_spaces(page.select_one('header + .govuk-width-container nav').text) == ( - 'Send messages Sent messages Letters Team members' + 'Send messages Sent messages Team members' ) From 38fa1286b2d1b985fe004f3676f981a43a7e5f23 Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Fri, 14 Oct 2022 18:58:55 +0000 Subject: [PATCH 2/5] clean up admin ui & update tests --- .../views/dashboard/write-first-messages.html | 6 +-- .../organisations/organisation/index.html | 16 +++--- .../organisation/settings/index.html | 4 +- .../views/accounts/test_choose_accounts.py | 2 +- .../views/organisations/test_organisations.py | 18 +++---- .../service_settings/test_service_settings.py | 50 ++++++++++--------- tests/app/main/views/test_dashboard.py | 49 +++++++++--------- 7 files changed, 75 insertions(+), 70 deletions(-) diff --git a/app/templates/views/dashboard/write-first-messages.html b/app/templates/views/dashboard/write-first-messages.html index 37a6c4278..1abd722d8 100644 --- a/app/templates/views/dashboard/write-first-messages.html +++ b/app/templates/views/dashboard/write-first-messages.html @@ -2,10 +2,10 @@ diff --git a/app/templates/views/organisations/organisation/index.html b/app/templates/views/organisations/organisation/index.html index 7fabec5d1..b10efba95 100644 --- a/app/templates/views/organisations/organisation/index.html +++ b/app/templates/views/organisations/organisation/index.html @@ -33,7 +33,7 @@ {{ big_number( total_sms_cost, 'spent', - currency="£", + currency="$", smaller=True ) }}
    @@ -44,7 +44,7 @@ {{ big_number( total_letter_cost, 'spent', - currency="£", + currency="$", smaller=True ) }}
    @@ -70,19 +70,19 @@ {{ service.service_name }}
    -
    +
    {{ big_number( service.emails_sent, label=service.emails_sent|message_count_label('email'), smallest=True ) }}
    -
    +
    {% if service.sms_cost %} {{ big_number( service.sms_cost, 'spent on text messages', - currency="£", + currency="$", smallest=True ) }} {% else %} @@ -93,14 +93,14 @@ ) }} {% endif %}
    - +
    {% endfor %} diff --git a/app/templates/views/organisations/organisation/settings/index.html b/app/templates/views/organisations/organisation/settings/index.html index 576143ed6..ca63ce59c 100644 --- a/app/templates/views/organisations/organisation/settings/index.html +++ b/app/templates/views/organisations/organisation/settings/index.html @@ -109,7 +109,7 @@ ) }} {% endcall %} - {% call row() %} + {% call row() %} {{ text_field('Known email domains') }} {{ optional_text_field(current_org.domains or None, default='None') }} diff --git a/tests/app/main/views/accounts/test_choose_accounts.py b/tests/app/main/views/accounts/test_choose_accounts.py index bac4ffc0b..a99404c80 100644 --- a/tests/app/main/views/accounts/test_choose_accounts.py +++ b/tests/app/main/views/accounts/test_choose_accounts.py @@ -326,7 +326,7 @@ def test_should_show_back_to_service_if_user_belongs_to_service( '' 'Dashboard ' 'Send messages ' - 'Letters ' + # 'Letters ' 'Team members' ) # TODO: set sidebar variables in common test module diff --git a/tests/app/main/views/organisations/test_organisations.py b/tests/app/main/views/organisations/test_organisations.py index 598948506..e309b2974 100644 --- a/tests/app/main/views/organisations/test_organisations.py +++ b/tests/app/main/views/organisations/test_organisations.py @@ -469,8 +469,8 @@ def test_organisation_services_shows_live_services_and_usage( # Totals assert normalize_spaces(usage_rows[0].text) == "Emails 33,000 sent" - assert normalize_spaces(usage_rows[1].text) == "Text messages £42.00 spent" - assert normalize_spaces(usage_rows[2].text) == "Letters £30.50 spent" + assert normalize_spaces(usage_rows[1].text) == "Text messages $42.00 spent" + assert normalize_spaces(usage_rows[2].text) == "Letters $30.50 spent" assert normalize_spaces(services[0].text) == '1' assert normalize_spaces(services[1].text) == '5' @@ -478,11 +478,11 @@ def test_organisation_services_shows_live_services_and_usage( assert normalize_spaces(usage_rows[3].text) == "13,000 emails sent" assert normalize_spaces(usage_rows[4].text) == "122 free text messages sent" - assert normalize_spaces(usage_rows[5].text) == "£30.50 spent on letters" + assert normalize_spaces(usage_rows[5].text) == "$30.50 spent on letters" assert services[1].find('a')['href'] == url_for('main.usage', service_id=SERVICE_TWO_ID) assert normalize_spaces(usage_rows[6].text) == "20,000 emails sent" - assert normalize_spaces(usage_rows[7].text) == "£42.00 spent on text messages" - assert normalize_spaces(usage_rows[8].text) == "£0.00 spent on letters" + assert normalize_spaces(usage_rows[7].text) == "$42.00 spent on text messages" + assert normalize_spaces(usage_rows[8].text) == "$0.00 spent on letters" # Ensure there’s no ‘this org has no services message’ assert not page.select('.govuk-hint') @@ -512,12 +512,12 @@ def test_organisation_services_shows_live_services_and_usage_with_count_of_1( # Totals assert normalize_spaces(usage_rows[0].text) == "Emails 1 sent" - assert normalize_spaces(usage_rows[1].text) == "Text messages £0.00 spent" - assert normalize_spaces(usage_rows[2].text) == "Letters £0.00 spent" + assert normalize_spaces(usage_rows[1].text) == "Text messages $0.00 spent" + assert normalize_spaces(usage_rows[2].text) == "Letters $0.00 spent" assert normalize_spaces(usage_rows[3].text) == "1 email sent" assert normalize_spaces(usage_rows[4].text) == "1 free text message sent" - assert normalize_spaces(usage_rows[5].text) == "£0.00 spent on letters" + assert normalize_spaces(usage_rows[5].text) == "$0.00 spent on letters" @freeze_time("2020-02-20 20:20") @@ -938,7 +938,7 @@ def test_organisation_settings_for_platform_admin( 'Billing details None Change billing details for the organisation', 'Notes None Change the notes for the organisation', 'Default email branding GOV.UK Change default email branding for the organisation', - 'Default letter branding No branding Change default letter branding for the organisation', + # 'Default letter branding No branding Change default letter branding for the organisation', 'Known email domains None Change known email domains for the organisation', ] diff --git a/tests/app/main/views/service_settings/test_service_settings.py b/tests/app/main/views/service_settings/test_service_settings.py index ff702a4b2..7d8ca0e51 100644 --- a/tests/app/main/views/service_settings/test_service_settings.py +++ b/tests/app/main/views/service_settings/test_service_settings.py @@ -74,8 +74,8 @@ def mock_get_service_settings_page_common( 'Send international text messages Off Change your settings for sending international text messages', 'Receive text messages Off Change your settings for receiving text messages', - 'Label Value Action', - 'Send letters Off Change your settings for sending letters', + # 'Label Value Action', + # 'Send letters Off Change your settings for sending letters', ]), (create_platform_admin_user(), [ @@ -97,8 +97,8 @@ def mock_get_service_settings_page_common( 'Send international text messages Off Change your settings for sending international text messages', 'Receive text messages Off Change your settings for receiving text messages', - 'Label Value Action', - 'Send letters Off Change your settings for sending letters', + # 'Label Value Action', + # 'Send letters Off Change your settings for sending letters', 'Label Value Action', 'Live Off Change service status', @@ -344,8 +344,8 @@ def test_send_files_by_email_row_on_settings_page( 'Send international text messages On Change your settings for sending international text messages', 'Receive text messages On Change your settings for receiving text messages', - 'Label Value Action', - 'Send letters Off Change your settings for sending letters', + # 'Label Value Action', + # 'Send letters Off Change your settings for sending letters', ]), (['email', 'sms', 'email_auth'], [ @@ -366,28 +366,28 @@ def test_send_files_by_email_row_on_settings_page( 'Send international text messages Off Change your settings for sending international text messages', 'Receive text messages Off Change your settings for receiving text messages', - 'Label Value Action', - 'Send letters Off Change your settings for sending letters', + # 'Label Value Action', + # 'Send letters Off Change your settings for sending letters', ]), - (['letter'], [ + # (['letter'], [ - 'Service name service one Change service name', - 'Sign-in method Text message code Change sign-in method', + # 'Service name service one Change service name', + # 'Sign-in method Text message code Change sign-in method', - 'Label Value Action', - 'Send emails Off Change your settings for sending emails', + # 'Label Value Action', + # 'Send emails Off Change your settings for sending emails', - 'Label Value Action', - 'Send text messages Off Change your settings for sending text messages', + # 'Label Value Action', + # 'Send text messages Off Change your settings for sending text messages', - 'Label Value Action', - 'Send letters On Change your settings for sending letters', - 'Send international letters Off Change', - 'Sender addresses 1 Example Street Manage sender addresses', - 'Letter branding Not set Change letter branding', + # 'Label Value Action', + # 'Send letters On Change your settings for sending letters', + # 'Send international letters Off Change', + # 'Sender addresses 1 Example Street Manage sender addresses', + # 'Letter branding Not set Change letter branding', - ]), + # ]), (['broadcast'], [ 'Service name service one Change service name', @@ -418,6 +418,7 @@ def test_should_show_overview_for_service_with_more_things_set( assert row == " ".join(page.find_all('tr')[index + 1].text.split()) +@pytest.mark.skip(reason="Skipping letter-specific test") def test_if_cant_send_letters_then_cant_see_letter_contact_block( client_request, service_one, @@ -430,6 +431,7 @@ def test_if_cant_send_letters_then_cant_see_letter_contact_block( assert 'Letter contact block' not in response +@pytest.mark.skip(reason="Skipping letter-specific test") def test_letter_contact_block_shows_none_if_not_set( client_request, service_one, @@ -449,6 +451,7 @@ def test_letter_contact_block_shows_none_if_not_set( assert 'default' in div.attrs['class'][0] +@pytest.mark.skip(reason="Skipping letter-specific test") def test_escapes_letter_contact_block( client_request, service_one, @@ -2085,7 +2088,7 @@ def test_and_more_hint_appears_on_settings_with_more_than_just_a_single_sender( multiple_sms_senders, mock_get_service_settings_page_common, ): - service_one['permissions'] = ['email', 'sms', 'letter'] + service_one['permissions'] = ['email', 'sms'] page = client_request.get( 'main.service_settings', @@ -2101,7 +2104,7 @@ def test_and_more_hint_appears_on_settings_with_more_than_just_a_single_sender( "Reply-to email addresses test@example.com …and 2 more Manage reply-to email addresses" assert get_row(page, 'Text message senders') == \ "Text message senders Example …and 2 more Manage text message senders" - assert get_row(page, 'Sender addresses') == "Sender addresses 1 Example Street …and 2 more Manage sender addresses" + # assert get_row(page, 'Sender addresses') == "Sender addresses 1 Example Street …and 2 more Manage sender addresses" @pytest.mark.parametrize('sender_list_page, index, expected_output', [ @@ -4755,6 +4758,7 @@ def test_service_settings_links_to_branding_request_page_for_emails( assert len(page.find_all('a', attrs={'href': expected_href})) == 1 +@pytest.mark.skip(reason="Skipping letter-specific test") def test_service_settings_links_to_branding_request_page_for_letters( mocker, service_one, diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index c1e532321..cb9692fcb 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -904,21 +904,21 @@ def test_should_not_show_upcoming_jobs_on_dashboard_if_service_has_no_jobs( @pytest.mark.parametrize('permissions', ( ['email', 'sms'], - ['email', 'sms', 'letter'], + # ['email', 'sms', 'letter'], )) @pytest.mark.parametrize('totals', [ ( { 'email': {'requested': 0, 'delivered': 0, 'failed': 0}, 'sms': {'requested': 99999, 'delivered': 0, 'failed': 0}, - 'letter': {'requested': 99999, 'delivered': 0, 'failed': 0} + # 'letter': {'requested': 99999, 'delivered': 0, 'failed': 0} }, ), ( { 'email': {'requested': 0, 'delivered': 0, 'failed': 0}, 'sms': {'requested': 0, 'delivered': 0, 'failed': 0}, - 'letter': {'requested': 100000, 'delivered': 0, 'failed': 0}, + # 'letter': {'requested': 100000, 'delivered': 0, 'failed': 0}, }, ), ]) @@ -950,12 +950,12 @@ def test_correct_font_size_for_big_numbers( ) assert ( - len(page.select_one('[data-key=totals]').select('.govuk-grid-column-one-third')) + len(page.select_one('[data-key=totals]').select('.govuk-grid-column-one-half')) ) == ( - len(page.select_one('[data-key=usage]').select('.govuk-grid-column-one-third')) + len(page.select_one('[data-key=usage]').select('.govuk-grid-column-one-half')) ) == ( len(page.select('.big-number-with-status .big-number-smaller')) - ) == 3 + ) == 2 def test_should_not_show_jobs_on_dashboard_for_users_with_uploads_page( @@ -1007,14 +1007,14 @@ def test_usage_page( assert normalize_spaces(unselected_nav_links[0].text) == '2010 to 2011 financial year' assert normalize_spaces(unselected_nav_links[1].text) == '2009 to 2010 financial year' - annual_usage = page.find_all('div', {'class': 'govuk-grid-column-one-third'}) + annual_usage = page.find_all('div', {'class': 'govuk-grid-column-one-half'}) # annual stats are shown in two rows, each with three column; email is col 1 - email_column = normalize_spaces(annual_usage[0].text + annual_usage[3].text) + email_column = normalize_spaces(annual_usage[0].text + annual_usage[2].text) assert 'Emails' in email_column assert '1,000 sent' in email_column - sms_column = normalize_spaces(annual_usage[1].text + annual_usage[4].text) + sms_column = normalize_spaces(annual_usage[1].text + annual_usage[3].text) assert 'Text messages' in sms_column assert '251,800 sent' in sms_column assert '250,000 free allowance' in sms_column @@ -1023,10 +1023,10 @@ def test_usage_page( assert '1,500 at 1.65 pence' in sms_column assert '300 at 1.70 pence' in sms_column - letter_column = normalize_spaces(annual_usage[2].text + annual_usage[5].text) - assert 'Letters' in letter_column - assert '100 sent' in letter_column - assert '£30.00 spent' in letter_column + # letter_column = normalize_spaces(annual_usage[2].text + annual_usage[5].text) + # assert 'Letters' in letter_column + # assert '100 sent' in letter_column + # assert '£30.00 spent' in letter_column @freeze_time("2012-03-31 12:12:12") @@ -1051,8 +1051,8 @@ def test_usage_page_no_sms_spend( service_id=SERVICE_ONE_ID, ) - annual_usage = page.find_all('div', {'class': 'govuk-grid-column-one-third'}) - sms_column = normalize_spaces(annual_usage[1].text + annual_usage[4].text) + annual_usage = page.find_all('div', {'class': 'govuk-grid-column-one-half'}) + sms_column = normalize_spaces(annual_usage[1].text + annual_usage[3].text) assert 'Text messages' in sms_column assert '250,000 free allowance' in sms_column assert '249,000 free allowance remaining' in sms_column @@ -1079,10 +1079,10 @@ def test_usage_page_monthly_breakdown( assert '140 free text messages' in monthly_breakdown assert '960 text messages at 1.65p' in monthly_breakdown assert '33 text messages at 1.70p' in monthly_breakdown - assert '5 first class letters at 33p' in monthly_breakdown - assert '10 second class letters at 31p' in monthly_breakdown - assert '3 international letters at 55p' in monthly_breakdown - assert '7 international letters at 84p' in monthly_breakdown + # assert '5 first class letters at 33p' in monthly_breakdown + # assert '10 second class letters at 31p' in monthly_breakdown + # assert '3 international letters at 55p' in monthly_breakdown + # assert '7 international letters at 84p' in monthly_breakdown assert 'March' in monthly_breakdown assert '£20.91' in monthly_breakdown @@ -1110,6 +1110,7 @@ def test_usage_page_monthly_breakdown_shows_months_so_far( assert len(rows) == expected_number_of_months +@pytest.mark.skip(reason="Skipping letter-specific test") @freeze_time("2012-03-31 12:12:12") def test_usage_page_letter_breakdown_ordered_by_postage_and_rate( client_request, @@ -1144,7 +1145,7 @@ def test_usage_page_with_0_free_allowance( year=2020, ) - annual_usage = page.select('main .govuk-grid-column-one-third') + annual_usage = page.select('main .govuk-grid-column-one-half') sms_column = normalize_spaces(annual_usage[1].text) assert '0 free allowance' in sms_column @@ -1705,7 +1706,7 @@ def test_breadcrumb_shows_if_service_is_suspended( @pytest.mark.parametrize('permissions', ( ['email', 'sms'], - ['email', 'sms', 'letter'], + # ['email', 'sms', 'letter'], )) def test_service_dashboard_shows_usage( client_request, @@ -1727,9 +1728,9 @@ def test_service_dashboard_shows_usage( 'Unlimited ' 'free email allowance ' '£29.85 ' - 'spent on text messages ' - '£30.00 ' - 'spent on letters' + 'spent on text messages' + # '£30.00 ' + # 'spent on letters' ) From aac17bb2afbf49cd374b75a354e94edfa09b616d Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Fri, 14 Oct 2022 19:22:03 +0000 Subject: [PATCH 3/5] get flake8's approval --- tests/app/main/views/service_settings/test_service_settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/app/main/views/service_settings/test_service_settings.py b/tests/app/main/views/service_settings/test_service_settings.py index 7d8ca0e51..a1d81830a 100644 --- a/tests/app/main/views/service_settings/test_service_settings.py +++ b/tests/app/main/views/service_settings/test_service_settings.py @@ -2104,7 +2104,8 @@ def test_and_more_hint_appears_on_settings_with_more_than_just_a_single_sender( "Reply-to email addresses test@example.com …and 2 more Manage reply-to email addresses" assert get_row(page, 'Text message senders') == \ "Text message senders Example …and 2 more Manage text message senders" - # assert get_row(page, 'Sender addresses') == "Sender addresses 1 Example Street …and 2 more Manage sender addresses" + # assert get_row(page, 'Sender addresses') == \ + # "Sender addresses 1 Example Street …and 2 more Manage sender addresses" @pytest.mark.parametrize('sender_list_page, index, expected_output', [ From 44e8c0fe89370a7db1a11b7601140a6e4d787462 Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Mon, 17 Oct 2022 13:42:36 +0000 Subject: [PATCH 4/5] post-merge flake8 fix --- tests/app/main/views/test_dashboard.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index 497812008..dc726d538 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -1028,6 +1028,7 @@ def test_usage_page( # assert '100 sent' in letter_column # assert '$30.00 spent' in letter_column + @freeze_time("2012-03-31 12:12:12") def test_usage_page_no_sms_spend( mocker, From b6a6a14bc75b40d296f424653f0d7e67a26e43fe Mon Sep 17 00:00:00 2001 From: stvnrlly Date: Tue, 18 Oct 2022 15:27:13 +0000 Subject: [PATCH 5/5] now with even fewer letters --- app/main/forms.py | 2 +- app/main/views/sub_navigation_dictionaries.py | 24 +++++++++---------- app/templates/views/features.html | 8 +++---- app/templates/views/guidance/index.html | 8 +++---- app/templates/views/pricing/index.html | 12 +++++----- app/templates/views/privacy.html | 2 +- app/templates/views/signedout.html | 18 ++++---------- app/templates/views/trial-mode.html | 2 +- tests/app/main/views/test_feedback.py | 2 +- tests/app/main/views/test_index.py | 5 ++-- 10 files changed, 37 insertions(+), 46 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 0cbed0e20..d536076f3 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1674,7 +1674,7 @@ class SupportRedirect(StripWhitespaceForm): who = GovukRadiosField( 'What do you need help with?', choices=[ - ('public-sector', 'I work in the public sector and need to send emails, text messages or letters'), + ('public-sector', 'I work in the public sector and need to send emails or text messages'), ('public', 'I’m a member of the public with a question for the government'), ], param_extensions={ diff --git a/app/main/views/sub_navigation_dictionaries.py b/app/main/views/sub_navigation_dictionaries.py index 7d42937be..a86ffcf1f 100644 --- a/app/main/views/sub_navigation_dictionaries.py +++ b/app/main/views/sub_navigation_dictionaries.py @@ -12,10 +12,10 @@ def features_nav(): "name": "Text messages", "link": "main.features_sms", }, - { - "name": "Letters", - "link": "main.features_letters", - }, + # { + # "name": "Letters", + # "link": "main.features_letters", + # }, ] }, { @@ -84,14 +84,14 @@ def using_notify_nav(): "name": "Send files by email", "link": "main.send_files_by_email", }, - { - "name": "Upload a letter", - "link": "main.upload_a_letter", - }, - { - "name": "Letter specification", - "link": "main.letter_specification", - }, + # { + # "name": "Upload a letter", + # "link": "main.upload_a_letter", + # }, + # { + # "name": "Letter specification", + # "link": "main.letter_specification", + # }, ] }, { diff --git a/app/templates/views/features.html b/app/templates/views/features.html index 7a8e0c9bd..0f3352f54 100644 --- a/app/templates/views/features.html +++ b/app/templates/views/features.html @@ -14,7 +14,7 @@

    You do not need any technical knowledge to use Notify.

    {% if not current_user.is_authenticated %} @@ -22,7 +22,7 @@ {% endif %}

    Reusable message templates

    -

    To send an email, text or letter with Notify, you need to create a reusable message template first.

    +

    To send an email or text with Notify, you need to create a reusable message template first.

    Templates let you send the same thing to lots of people, as often as you need to, without writing a new message each time.

    Personalised content

    @@ -53,10 +53,10 @@

    Notify commits to:

    • sending 95% of emails and text messages within 10 seconds
    • -
    • printing and posting letters by 3pm the next working day (if you send them to us before 5:30pm)
    • +
    -

    We send messages through several different providers. If one provider fails, Notify switches to another so that your messages are not affected.

    +

    Visit our performance data page to see how Notify is performing.

    diff --git a/app/templates/views/guidance/index.html b/app/templates/views/guidance/index.html index 8e5454f93..29af61c8b 100644 --- a/app/templates/views/guidance/index.html +++ b/app/templates/views/guidance/index.html @@ -10,7 +10,7 @@

    Guidance

    -

    This guidance is for teams using US Notify to send emails, text messages and letters.

    +

    This guidance is for teams using US Notify to send emails and text messages.

    It explains how to:

    @@ -18,16 +18,16 @@
  • edit and format messages
  • add branding and customisation
  • send files by email
  • -
  • upload a letter
  • +

    More information

    -

    The US NotifyService Manual has advice on:

    +

    The US Notify Service Manual has advice on:

    diff --git a/app/templates/views/pricing/index.html b/app/templates/views/pricing/index.html index d0554095e..5669fcc13 100644 --- a/app/templates/views/pricing/index.html +++ b/app/templates/views/pricing/index.html @@ -22,10 +22,10 @@

    US Notify is free to use unless you:

    -

    You’ll only pay for the additional text messages or letters that you send. There’s no monthly charge, no setup fee and no procurement cost.

    +

    You’ll only pay for the additional text messages that you send. There’s no monthly charge, no setup fee and no procurement cost.

    {% if not current_user.is_authenticated %} @@ -229,7 +229,7 @@ "html": smsIntRates }) }} -

    Letters

    + -
    + {% endblock %} diff --git a/app/templates/views/privacy.html b/app/templates/views/privacy.html index 4aca97402..0948a126e 100644 --- a/app/templates/views/privacy.html +++ b/app/templates/views/privacy.html @@ -19,7 +19,7 @@

    Who we are

    -

    US Notify is a service that lets public service teams in the UK send emails, text messages, and letters +

    US Notify is a service that lets public service teams in the United States send text messages to users of their service.

    US Notify is provided by the Government Digital Service (GDS) which is part of the Cabinet Office.

    diff --git a/app/templates/views/signedout.html b/app/templates/views/signedout.html index b2cfdd06a..58b6ed73a 100644 --- a/app/templates/views/signedout.html +++ b/app/templates/views/signedout.html @@ -2,7 +2,7 @@ {% from "components/button/macro.njk" import govukButton %} {% block meta %} - + {% endblock %} {% block pageTitle %} @@ -26,7 +26,7 @@

    - Send emails, text messages and letters to your users + Send text messages and email to your users

    Try US Notify now if you work in federal, state or local government. @@ -115,16 +115,6 @@

    -
    -

    - Introducing US Notify -

    -
    -
    - -
    -
    -

    Who’s using US Notify

    @@ -147,7 +137,7 @@

    -
    +
    diff --git a/app/templates/views/trial-mode.html b/app/templates/views/trial-mode.html index 4fb808af6..51aa2328b 100644 --- a/app/templates/views/trial-mode.html +++ b/app/templates/views/trial-mode.html @@ -13,7 +13,7 @@
    • send 50 text messages and emails per day
    • send messages to yourself and other people in your team
    • -
    • create letter templates, but not send them
    • +
    {% if current_service and current_service.trial_mode %} diff --git a/tests/app/main/views/test_feedback.py b/tests/app/main/views/test_feedback.py index a7fd23ab9..33815abcc 100644 --- a/tests/app/main/views/test_feedback.py +++ b/tests/app/main/views/test_feedback.py @@ -51,7 +51,7 @@ def test_get_support_index_page_when_signed_out( assert normalize_spaces( page.select_one('form label[for=who-0]').text ) == ( - 'I work in the public sector and need to send emails, text messages or letters' + 'I work in the public sector and need to send emails or text messages' ) assert page.select_one('form input#who-0')['value'] == 'public-sector' assert normalize_spaces( diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index fce7c146a..71c5a78be 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -17,7 +17,7 @@ def test_non_logged_in_user_can_see_homepage( page = client_request.get('main.index', _test_page_title=False) assert page.h1.text.strip() == ( - 'Send emails, text messages and letters to your users' + 'Send text messages and email to your users' ) assert page.select_one('a[role=button][draggable=false]')['href'] == url_for( @@ -25,7 +25,7 @@ def test_non_logged_in_user_can_see_homepage( ) assert page.select_one('meta[name=description]')['content'].strip() == ( - 'US Notify lets you send emails, text messages and letters ' + 'US Notify lets you send text messages and email ' 'to your users. Try it now if you work in federal, state or local government.' ) @@ -360,6 +360,7 @@ def test_font_preload( @pytest.mark.parametrize('current_date, expected_rate', ( ('2022-05-01', '1.72'), )) +@pytest.mark.skip(reason="Currently hidden for TTS") def test_sms_price( client_request, mock_get_service_and_organisation_counts,