+
{{ 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/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 ddf8c7179..18e47fa27 100644
--- a/tests/app/main/views/organisations/test_organisations.py
+++ b/tests/app/main/views/organisations/test_organisations.py
@@ -943,7 +943,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 f6e8b7429..d23935322 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,
@@ -2067,7 +2070,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',
@@ -2083,7 +2086,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', [
@@ -4737,6 +4741,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 ec8fba8d9..dc726d538 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'
)
diff --git a/tests/app/main/views/test_feedback.py b/tests/app/main/views/test_feedback.py
index 3e50259b1..4c01d2a37 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,
diff --git a/tests/app/test_navigation.py b/tests/app/test_navigation.py
index 9203c8bd6..bbcb488b7 100644
--- a/tests/app/test_navigation.py
+++ b/tests/app/test_navigation.py
@@ -512,7 +512,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),
@@ -591,7 +591,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'
)
@@ -610,5 +610,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'
)