mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-12 13:20:43 -04:00
We have a `client_request` fixture which does a bunch of useful stuff like: - checking the status code of the response - returning a `BeautifulSoup` object For most tests of a platform admin view we used `platform_admin_client` instead. This is not as good because it returns a raw `Response` object and doesn’t do the additional checks. This commit converts all the tests using `platform_admin_client` to: use new `client_request` and log in as `platform_admin_user` before making any requests. This is also nice because it makes any test easy to parametrize with additional users, for example to test differences in behaviour dependant on being platform admin or not.
39 lines
1.2 KiB
HTML
39 lines
1.2 KiB
HTML
{% extends "views/platform-admin/_base_template.html" %}
|
|
{% from "components/page-footer.html" import page_footer %}
|
|
{% from "components/previous-next-navigation.html" import previous_next_navigation %}
|
|
{% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading %}
|
|
|
|
{% block per_page_title %}
|
|
Email complaints
|
|
{% endblock %}
|
|
|
|
{% block platform_admin_content %}
|
|
|
|
<h1 class="heading-medium">
|
|
Email complaints
|
|
</h1>
|
|
|
|
|
|
{% call(item, row_number) list_table(
|
|
complaints,
|
|
caption="Complaints",
|
|
caption_visible=False,
|
|
empty_message='No complaints',
|
|
field_headings=['Notification Id', 'Service', 'Complaint type', 'Complaint Date'],
|
|
field_headings_visible=True
|
|
) %}
|
|
|
|
{{ link_field(item.notification_id, url_for('main.view_notification', service_id=item.service_id, notification_id=item.notification_id)) }}
|
|
|
|
{{ link_field(item.service_name, url_for('main.service_dashboard', service_id=item.service_id)) }}
|
|
|
|
{{ text_field(item.complaint_type) }}
|
|
|
|
{{ text_field(item.complaint_date|format_datetime_short if item.complaint_date else None) }}
|
|
|
|
{% endcall %}
|
|
|
|
{{ previous_next_navigation(prev_page, next_page) }}
|
|
|
|
{% endblock %}
|