mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-20 16:13:24 -04:00
Auto populate the phone number when replying
Currently the only way of ‘replying’ to an inbound message is by copy/pasting the phone number from the inbound page into the send one off page. Rather than making people copy/paste, this commit puts the phone number in the session, if the user is going through the new reply flow.
This commit is contained in:
@@ -257,8 +257,32 @@ def test_conversation_reply_shows_templates(
|
||||
assert normalize_spaces(link.text) == expected
|
||||
assert link.select_one('a')['href'].startswith(
|
||||
url_for(
|
||||
'main.view_template',
|
||||
'main.conversation_reply_with_template',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id=fake_uuid,
|
||||
template_id='',
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def test_conversation_reply_redirects_with_phone_number_from_notification(
|
||||
client_request,
|
||||
fake_uuid,
|
||||
mock_get_notification,
|
||||
mock_get_service_template,
|
||||
):
|
||||
|
||||
page = client_request.get(
|
||||
'main.conversation_reply_with_template',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id=fake_uuid,
|
||||
template_id=fake_uuid,
|
||||
_follow_redirects=True,
|
||||
)
|
||||
|
||||
for element, expected_text in [
|
||||
('h1', 'Preview of Two week reminder'),
|
||||
('.sms-message-recipient', 'To: 07123 456789'),
|
||||
('.sms-message-wrapper', 'service one: Template <em>content</em> with & entity'),
|
||||
]:
|
||||
assert normalize_spaces(page.select_one(element).text) == expected_text
|
||||
|
||||
Reference in New Issue
Block a user