Show link to service history in the settings page

Based on discussion in [^1].

[^1]: https://github.com/alphagov/notifications-admin/pull/4157
This commit is contained in:
Ben Thorner
2022-03-24 12:58:56 +00:00
parent 808f248782
commit 422b4c1091
2 changed files with 15 additions and 1 deletions

View File

@@ -471,6 +471,12 @@
Suspend service
</a>
</span>
<span class="page-footer-link">
<a href="{{ url_for('.history', service_id=current_service.id) }}" class="govuk-link govuk-link--no-visited-state page-footer-link">
Service history
</a>
</span>
{% endif %}
</p>
{% endif %}
@@ -485,6 +491,12 @@
Resume service
</a>
</span>
<span class="page-footer-link">
<a href="{{ url_for('.history', service_id=current_service.id) }}" class="govuk-link govuk-link--no-visited-state page-footer-link">
Service history
</a>
</span>
</p>
{% endif %}

View File

@@ -151,9 +151,11 @@ def test_service_setting_toggles_show(
@pytest.mark.parametrize('service_fields, endpoint, index, text', [
({'active': True}, '.archive_service', 0, 'Delete this service'),
({'active': True}, '.suspend_service', 1, 'Suspend service'),
({'active': True}, '.history', 2, 'Service history'),
({'active': False}, '.resume_service', 0, 'Resume service'),
({'active': False}, '.history', 1, 'Service history'),
pytest.param(
{'active': False}, '.archive_service', 1, 'Resume service',
{'active': False}, '.archive_service', 2, 'Resume service',
marks=pytest.mark.xfail(raises=IndexError)
)
])