mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 18:09:13 -04:00
Make it clear which template you’re sending
The one downside of skipping the template page is that you no longer get such strong confirmation that you’ve picked the correct template. You still see the preview of the template, but it’s further down the page, and the name of the template has disappeared. This commit adds the name of the template to the page title, to: - have some continuity from the previous page - make it easier to double-check you’ve chosen the correct template
This commit is contained in:
@@ -295,7 +295,7 @@ def test_conversation_reply_redirects_with_phone_number_from_notification(
|
||||
)
|
||||
|
||||
for element, expected_text in [
|
||||
('h1', 'Preview of Two week reminder'),
|
||||
('h1', 'Preview of ‘Two week reminder’'),
|
||||
('.sms-message-recipient', 'To: 07123 456789'),
|
||||
('.sms-message-wrapper', 'service one: Template <em>content</em> with & entity'),
|
||||
]:
|
||||
|
||||
@@ -919,7 +919,7 @@ def test_send_test_doesnt_show_file_contents(
|
||||
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.select('h1')[0].text.strip() == 'Preview of Two week reminder'
|
||||
assert page.select('h1')[0].text.strip() == 'Preview of ‘Two week reminder’'
|
||||
assert len(page.select('table')) == 0
|
||||
assert len(page.select('.banner-dangerous')) == 0
|
||||
assert page.select_one('button[type=submit]').text.strip() == 'Send 1 text message'
|
||||
@@ -1039,7 +1039,7 @@ def test_send_one_off_does_not_send_without_the_correct_permissions(
|
||||
(
|
||||
mock_get_service_template_with_placeholders,
|
||||
partial(url_for, 'main.send_one_off'),
|
||||
'Who should this message be sent to?',
|
||||
'Send ‘Two week reminder’',
|
||||
False,
|
||||
),
|
||||
(
|
||||
@@ -1063,7 +1063,7 @@ def test_send_one_off_does_not_send_without_the_correct_permissions(
|
||||
(
|
||||
mock_get_service_email_template,
|
||||
partial(url_for, 'main.send_one_off'),
|
||||
'Who should this message be sent to?',
|
||||
'Send ‘Two week reminder’',
|
||||
False,
|
||||
),
|
||||
(
|
||||
@@ -1479,7 +1479,7 @@ def test_send_test_email_message_without_placeholders_redirects_to_check_page(
|
||||
)
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.select('h1')[0].text.strip() == 'Preview of Two week reminder'
|
||||
assert page.select('h1')[0].text.strip() == 'Preview of ‘Two week reminder’'
|
||||
|
||||
|
||||
@pytest.mark.parametrize('user, expected_back_link_endpoint, extra_args', (
|
||||
@@ -2755,7 +2755,7 @@ def test_check_notification_shows_preview(
|
||||
template_id=fake_uuid
|
||||
)
|
||||
|
||||
assert page.h1.text.strip() == 'Preview of Two week reminder'
|
||||
assert page.h1.text.strip() == 'Preview of ‘Two week reminder’'
|
||||
assert (
|
||||
page.findAll('a', {'class': 'page-footer-back-link'})[0]['href']
|
||||
) == url_for(
|
||||
|
||||
Reference in New Issue
Block a user