mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-15 15:28:50 -04:00
Merge pull request #1671 from alphagov/auth-type-by-request
Invite users to choose how team members sign in
This commit is contained in:
@@ -46,6 +46,7 @@ def mock_get_service_settings_page_common(
|
||||
|
||||
'Label Value Action',
|
||||
'Service name service one Change',
|
||||
'Sign-in method Text message code Change',
|
||||
|
||||
'Label Value Action',
|
||||
'Send emails On Change',
|
||||
@@ -66,6 +67,7 @@ def mock_get_service_settings_page_common(
|
||||
|
||||
'Label Value Action',
|
||||
'Service name service one Change',
|
||||
'Sign-in method Text message code Change',
|
||||
|
||||
'Label Value Action',
|
||||
'Send emails On Change',
|
||||
@@ -122,6 +124,7 @@ def test_should_show_overview(
|
||||
(['email', 'sms', 'inbound_sms', 'international_sms'], [
|
||||
|
||||
'Service name service one Change',
|
||||
'Sign-in method Text message code Change',
|
||||
|
||||
'Label Value Action',
|
||||
'Send emails On Change',
|
||||
@@ -139,9 +142,10 @@ def test_should_show_overview(
|
||||
'Send letters Off Change',
|
||||
|
||||
]),
|
||||
(['email', 'sms'], [
|
||||
(['email', 'sms', 'email_auth'], [
|
||||
|
||||
'Service name service one Change',
|
||||
'Sign-in method Email link or text message code Change',
|
||||
|
||||
'Label Value Action',
|
||||
'Send emails On Change',
|
||||
@@ -249,7 +253,7 @@ def test_letter_contact_block_shows_none_if_not_set(
|
||||
))
|
||||
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
div = page.find_all('tr')[8].find_all('td')[1].div
|
||||
div = page.find_all('tr')[9].find_all('td')[1].div
|
||||
assert div.text.strip() == 'Not set'
|
||||
assert 'default' in div.attrs['class'][0]
|
||||
|
||||
@@ -269,7 +273,7 @@ def test_escapes_letter_contact_block(
|
||||
))
|
||||
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
div = str(page.find_all('tr')[8].find_all('td')[1].div)
|
||||
div = str(page.find_all('tr')[9].find_all('td')[1].div)
|
||||
assert 'foo<br/>bar' in div
|
||||
assert '<script>' not in div
|
||||
|
||||
@@ -713,9 +717,9 @@ def test_and_more_hint_appears_on_settings_with_more_than_just_a_single_sender(
|
||||
page.select('tbody tr')[index].text
|
||||
)
|
||||
|
||||
assert get_row(page, 2) == "Email reply to addresses test@example.com …and 2 more Manage"
|
||||
assert get_row(page, 4) == "Text message sender Example …and 2 more Manage"
|
||||
assert get_row(page, 9) == "Sender addresses 1 Example Street …and 2 more Manage"
|
||||
assert get_row(page, 3) == "Email reply to addresses test@example.com …and 2 more Manage"
|
||||
assert get_row(page, 5) == "Text message sender Example …and 2 more Manage"
|
||||
assert get_row(page, 10) == "Sender addresses 1 Example Street …and 2 more Manage"
|
||||
|
||||
|
||||
@pytest.mark.parametrize('sender_list_page, expected_output', [
|
||||
@@ -2003,6 +2007,20 @@ def test_cant_resume_active_service(
|
||||
'Your service can receive text messages sent to 0781239871.'
|
||||
)
|
||||
),
|
||||
(
|
||||
'main.service_set_auth_type',
|
||||
[],
|
||||
(
|
||||
'Text message code'
|
||||
)
|
||||
),
|
||||
(
|
||||
'main.service_set_auth_type',
|
||||
['email_auth'],
|
||||
(
|
||||
'Email link or text message code'
|
||||
)
|
||||
),
|
||||
])
|
||||
def test_invitation_pages(
|
||||
logged_in_client,
|
||||
|
||||
Reference in New Issue
Block a user