mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Merge pull request #4075 from alphagov/change-send-button-content
Update ‘Send’ button content
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) and not letter_too_long %}
|
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) and not letter_too_long %}
|
||||||
<div class="govuk-grid-column-one-half">
|
<div class="govuk-grid-column-one-half">
|
||||||
<a href="{{ url_for(".set_sender", service_id=current_service.id, template_id=template.id) }}" class="govuk-link govuk-link--no-visited-state pill-separate-item">
|
<a href="{{ url_for(".set_sender", service_id=current_service.id, template_id=template.id) }}" class="govuk-link govuk-link--no-visited-state pill-separate-item">
|
||||||
Send<span class="govuk-visually-hidden"> a message using this template</span>
|
Get ready to send<span class="govuk-visually-hidden"> a message using this template</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}
|
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}
|
||||||
<div class="govuk-grid-column-one-half">
|
<div class="govuk-grid-column-one-half">
|
||||||
<a href="{{ url_for(".set_sender", service_id=current_service.id, template_id=template.id) }}" class="govuk-link govuk-link--no-visited-state pill-separate-item">
|
<a href="{{ url_for(".set_sender", service_id=current_service.id, template_id=template.id) }}" class="govuk-link govuk-link--no-visited-state pill-separate-item">
|
||||||
Send<span class="govuk-visually-hidden"> a message using this template</span>
|
Get ready to send<span class="govuk-visually-hidden"> a message using this template</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -867,12 +867,17 @@ def test_edit_letter_templates_postage_updates_postage(
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
['manage_templates'],
|
['manage_templates'],
|
||||||
['.edit_service_template'],
|
[
|
||||||
|
('.edit_service_template', 'Edit'),
|
||||||
|
],
|
||||||
None,
|
None,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
['send_messages', 'manage_templates'],
|
['send_messages', 'manage_templates'],
|
||||||
['.set_sender', '.edit_service_template'],
|
[
|
||||||
|
('.set_sender', 'Get ready to send a message using this template'),
|
||||||
|
('.edit_service_template', 'Edit'),
|
||||||
|
],
|
||||||
None,
|
None,
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
@@ -904,16 +909,17 @@ def test_should_be_able_to_view_a_template_with_links(
|
|||||||
'Two week reminder – Templates – service one – GOV.UK Notify'
|
'Two week reminder – Templates – service one – GOV.UK Notify'
|
||||||
)
|
)
|
||||||
|
|
||||||
links_in_page = page.select('.pill-separate-item')
|
assert [
|
||||||
|
(link['href'], normalize_spaces(link.text))
|
||||||
assert len(links_in_page) == len(links_to_be_shown)
|
for link in page.select('.pill-separate-item')
|
||||||
|
] == [
|
||||||
for index, link_to_be_shown in enumerate(links_to_be_shown):
|
(url_for(
|
||||||
assert links_in_page[index]['href'] == url_for(
|
endpoint,
|
||||||
link_to_be_shown,
|
|
||||||
service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
template_id=fake_uuid,
|
template_id=fake_uuid,
|
||||||
)
|
), text)
|
||||||
|
for endpoint, text in links_to_be_shown
|
||||||
|
]
|
||||||
|
|
||||||
assert normalize_spaces(page.select_one('main p').text) == (
|
assert normalize_spaces(page.select_one('main p').text) == (
|
||||||
permissions_warning_to_be_shown or 'To: phone number'
|
permissions_warning_to_be_shown or 'To: phone number'
|
||||||
|
|||||||
Reference in New Issue
Block a user