mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-06 06:31:33 -04:00
Fix link to dashboard from end of tour
The notification page was different to the job page in that it passed through the whole template, not just the ID.
This commit is contained in:
committed by
Chris Hill Scott
parent
c791771498
commit
8eed32620d
@@ -32,7 +32,7 @@
|
||||
Notify delivers the message
|
||||
</p>
|
||||
{% if help == '3' %}
|
||||
<a href='{{ url_for(".go_to_dashboard_after_tour", service_id=current_service.id, example_template_id=template_id) }}'>
|
||||
<a href='{{ url_for(".go_to_dashboard_after_tour", service_id=current_service.id, example_template_id=template.id) }}'>
|
||||
Now go to your dashboard
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
@@ -1334,7 +1334,27 @@ def test_check_messages_back_link(
|
||||
) == expected_url(service_id=fake_uuid, template_id=fake_uuid)
|
||||
|
||||
|
||||
def test_go_to_dashboard_after_tour(
|
||||
def test_shows_link_to_end_tour(
|
||||
client_request,
|
||||
mock_get_notification,
|
||||
fake_uuid,
|
||||
):
|
||||
|
||||
page = client_request.get(
|
||||
'main.view_notification',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id=fake_uuid,
|
||||
help=3,
|
||||
)
|
||||
|
||||
assert page.select(".banner-tour a")[0]['href'] == url_for(
|
||||
'main.go_to_dashboard_after_tour',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
example_template_id='5407f4db-51c7-4150-8758-35412d42186a',
|
||||
)
|
||||
|
||||
|
||||
def test_go_to_dashboard_after_tour_link(
|
||||
logged_in_client,
|
||||
mocker,
|
||||
api_user_active,
|
||||
|
||||
@@ -1678,7 +1678,7 @@ def mock_get_notification(
|
||||
noti['personalisation'] = {'name': 'Jo'}
|
||||
noti['template'] = template_json(
|
||||
service_id,
|
||||
str(generate_uuid()),
|
||||
'5407f4db-51c7-4150-8758-35412d42186a',
|
||||
content='hello ((name))',
|
||||
redact_personalisation=redact_personalisation,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user