mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Added a hint to show default and receives text messages
This commit is contained in:
@@ -28,7 +28,9 @@ from tests.conftest import (
|
||||
multiple_reply_to_email_addresses,
|
||||
no_reply_to_email_addresses,
|
||||
multiple_sms_senders,
|
||||
no_sms_senders
|
||||
no_sms_senders,
|
||||
multiple_sms_senders_with_diff_default,
|
||||
multiple_sms_senders_no_inbound
|
||||
)
|
||||
|
||||
template_types = ['email', 'sms']
|
||||
@@ -82,7 +84,11 @@ def test_show_correct_title_and_description_for_sender_type(
|
||||
),
|
||||
(
|
||||
mock_get_service_template,
|
||||
multiple_sms_senders
|
||||
multiple_sms_senders_with_diff_default
|
||||
),
|
||||
(
|
||||
mock_get_service_template,
|
||||
multiple_sms_senders_no_inbound
|
||||
)
|
||||
])
|
||||
def test_default_sender_is_checked_and_has_hint(
|
||||
@@ -102,7 +108,26 @@ def test_default_sender_is_checked_and_has_hint(
|
||||
)
|
||||
|
||||
assert page.select('.multiple-choice input')[0].has_attr('checked')
|
||||
assert normalize_spaces(page.select_one('.multiple-choice label .block-label-hint').text) == "Default"
|
||||
assert normalize_spaces(page.select_one('.multiple-choice label .block-label-hint').text) == "(Default)"
|
||||
assert not page.select('.multiple-choice input')[1].has_attr('checked')
|
||||
|
||||
|
||||
def test_default_inbound_sender_is_checked_and_has_hint_with_default_and_receives_text(
|
||||
client_request,
|
||||
service_one,
|
||||
fake_uuid,
|
||||
mock_get_service_template,
|
||||
multiple_sms_senders
|
||||
):
|
||||
page = client_request.get(
|
||||
'.set_sender',
|
||||
service_id=service_one['id'],
|
||||
template_id=fake_uuid
|
||||
)
|
||||
|
||||
assert page.select('.multiple-choice input')[0].has_attr('checked')
|
||||
assert normalize_spaces(
|
||||
page.select_one('.multiple-choice label .block-label-hint').text) == "(Default and receives replies)"
|
||||
assert not page.select('.multiple-choice input')[1].has_attr('checked')
|
||||
assert not page.select('.multiple-choice input')[2].has_attr('checked')
|
||||
|
||||
@@ -121,7 +146,8 @@ def test_sms_sender_is_has_receives_replies_hint(
|
||||
)
|
||||
|
||||
assert page.select('.multiple-choice input')[0].has_attr('checked')
|
||||
assert normalize_spaces(page.select_one('.multiple-choice label .block-label-hint').text) == "Receives replies"
|
||||
assert normalize_spaces(
|
||||
page.select_one('.multiple-choice label .block-label-hint').text) == "(Default and receives replies)"
|
||||
assert not page.select('.multiple-choice input')[1].has_attr('checked')
|
||||
assert not page.select('.multiple-choice input')[2].has_attr('checked')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user