mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Merge pull request #1445 from alphagov/inbound-sms-number-shown-bug
Put the inbound number on the invite page
This commit is contained in:
@@ -176,6 +176,7 @@ def test_empty_inbox(
|
||||
mock_get_template_statistics,
|
||||
mock_get_usage,
|
||||
mock_get_inbound_sms_with_no_messages,
|
||||
mock_get_inbound_number_for_service,
|
||||
):
|
||||
|
||||
service_one['permissions'] = ['inbound_sms']
|
||||
@@ -185,7 +186,7 @@ def test_empty_inbox(
|
||||
|
||||
assert response.status_code == 200
|
||||
assert normalize_spaces(page.select('tbody tr')) == (
|
||||
'When users text your service’s phone number (GOVUK) you’ll see the messages here'
|
||||
'When users text your service’s phone number (0781239871) you’ll see the messages here'
|
||||
)
|
||||
|
||||
|
||||
@@ -210,6 +211,7 @@ def test_anyone_can_see_inbox(
|
||||
service_one,
|
||||
mocker,
|
||||
mock_get_inbound_sms_with_no_messages,
|
||||
mock_get_inbound_number_for_service,
|
||||
):
|
||||
|
||||
service_one['permissions'] = ['inbound_sms']
|
||||
|
||||
@@ -1296,28 +1296,61 @@ def test_cant_resume_active_service(
|
||||
assert 'Resume service' not in {a.text for a in page.find_all('a', class_='button')}
|
||||
|
||||
|
||||
@pytest.mark.parametrize('endpoint, expected_p', [
|
||||
@pytest.mark.parametrize('endpoint, permissions, expected_p', [
|
||||
(
|
||||
'main.service_set_international_sms',
|
||||
(
|
||||
'Sending text messages to international phone numbers is '
|
||||
'an invitation‑only feature.'
|
||||
)
|
||||
'main.service_set_international_sms',
|
||||
['sms'],
|
||||
(
|
||||
'Sending text messages to international phone numbers is '
|
||||
'an invitation‑only feature.'
|
||||
)
|
||||
),
|
||||
(
|
||||
'main.service_set_letters',
|
||||
(
|
||||
'Using GOV.UK Notify to send letters is an invitation‑only '
|
||||
'feature.'
|
||||
)
|
||||
'main.service_set_international_sms',
|
||||
['sms', 'international_sms'],
|
||||
(
|
||||
'Your service can send text messages to international phone numbers.'
|
||||
)
|
||||
),
|
||||
(
|
||||
'main.service_set_letters',
|
||||
[],
|
||||
(
|
||||
'Using GOV.UK Notify to send letters is an invitation‑only '
|
||||
'feature.'
|
||||
)
|
||||
),
|
||||
(
|
||||
'main.service_set_letters',
|
||||
['letter'],
|
||||
(
|
||||
'Your service can send letters.'
|
||||
)
|
||||
),
|
||||
(
|
||||
'main.service_set_inbound_sms',
|
||||
['sms'],
|
||||
(
|
||||
'Receiving text messages from your users is an invitation‑only feature.'
|
||||
)
|
||||
),
|
||||
(
|
||||
'main.service_set_inbound_sms',
|
||||
['sms', 'inbound_sms'],
|
||||
(
|
||||
'Your service can receive text messages sent to 0781239871.'
|
||||
)
|
||||
),
|
||||
])
|
||||
def test_invitation_pages(
|
||||
logged_in_client,
|
||||
service_one,
|
||||
endpoint,
|
||||
expected_p,
|
||||
logged_in_client,
|
||||
service_one,
|
||||
mock_get_inbound_number_for_service,
|
||||
endpoint,
|
||||
permissions,
|
||||
expected_p,
|
||||
):
|
||||
service_one['permissions'] = permissions
|
||||
response = logged_in_client.get(url_for(endpoint, service_id=service_one['id']))
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user