mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 05:30:21 -04:00
Change content for email reply-to verification journey
Earlier commits used placeholder content while awaiting official content.
This commit is contained in:
@@ -2026,11 +2026,12 @@ def test_add_reply_to_email_address_sends_test_notification(
|
||||
notification_id="123",
|
||||
_external=True,
|
||||
) + "?is_default={}".format(api_default_args)
|
||||
+ "&is_new=True"
|
||||
)
|
||||
mock_verify.assert_called_once_with(SERVICE_ONE_ID, "test@example.com")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("is_default", [True, False])
|
||||
@pytest.mark.parametrize("is_default,is_new,expected_header", [(True, "&is_new=True", "Add"), (False, "", "Change")])
|
||||
@pytest.mark.parametrize("status,expected_failure,expected_success", [
|
||||
("delivered", 0, 1),
|
||||
("sending", 0, 0),
|
||||
@@ -2038,7 +2039,7 @@ def test_add_reply_to_email_address_sends_test_notification(
|
||||
])
|
||||
@freeze_time("2018-06-01 11:11:00.061258")
|
||||
def test_service_verify_reply_to_address(
|
||||
mocker, client_request, fake_uuid, status, expected_failure, expected_success, is_default
|
||||
mocker, client_request, fake_uuid, status, expected_failure, expected_success, is_default, is_new, expected_header
|
||||
):
|
||||
notification = {
|
||||
"id": fake_uuid,
|
||||
@@ -2058,9 +2059,9 @@ def test_service_verify_reply_to_address(
|
||||
'main.service_verify_reply_to_address',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id=notification["id"],
|
||||
_optional_args="?is_default={}".format(is_default)
|
||||
_optional_args="?is_default={}{}".format(is_default, is_new)
|
||||
)
|
||||
assert page.find('h1').text == 'Verifying your reply-to email address'
|
||||
assert page.find('h1').text == '{} email reply-to address'.format(expected_header)
|
||||
assert len(page.find_all('div', class_='banner-dangerous')) == expected_failure
|
||||
assert len(page.find_all('div', class_='banner-default-with-tick')) == expected_success
|
||||
|
||||
@@ -2096,7 +2097,7 @@ def test_add_reply_to_email_address_fails_if_notification_not_delivered_in_5_min
|
||||
_optional_args="?is_default={}".format(False)
|
||||
)
|
||||
expected_banner = page.find_all('div', class_='banner-dangerous')[0]
|
||||
assert expected_banner.text.strip() == "Sorry dawg, this email address doesn't seem to be working :d"
|
||||
assert 'There’s a problem with your reply-to address' in expected_banner.text.strip()
|
||||
mock_add_reply_to_email_address.assert_not_called()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user