mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-04 21:40:23 -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.
63 lines
1.5 KiB
HTML
63 lines
1.5 KiB
HTML
{% extends "views/platform-admin/_base_template.html" %}
|
|
|
|
{% block per_page_title %}
|
|
Inbound SMS
|
|
{% endblock %}
|
|
|
|
{% set table_headings = {
|
|
'field_headings': [
|
|
'Number', 'Status', 'Service', 'Created on'
|
|
],
|
|
'field_headings_visible': True,
|
|
'caption_visible': True
|
|
} %}
|
|
|
|
|
|
.inbound {
|
|
font-style:normal;
|
|
font-weight:normal;
|
|
}
|
|
|
|
{% block platform_admin_content %}
|
|
|
|
<h1 class="heading-medium">
|
|
Inbound SMS
|
|
</h1>
|
|
|
|
<table class="inbound">
|
|
<col style="width:8%">
|
|
<col style="width:20%">
|
|
<col style="width:17%">
|
|
<col style="width:30%">
|
|
<thread>
|
|
<tr>
|
|
<th>{{table_headings.field_headings[0]}}</th>
|
|
<th>{{table_headings.field_headings[1]}}</th>
|
|
<th>{{table_headings.field_headings[2]}}</th>
|
|
</tr>
|
|
</thread>
|
|
<tbody>
|
|
|
|
{% for value in inbound_num_list.data: %}
|
|
<tr>
|
|
<td>{{value.number}}</td>
|
|
<td>
|
|
|
|
{% if value.active %}
|
|
Active
|
|
{% elif not value.service.name %}
|
|
Not used
|
|
{% else %}
|
|
Inactive
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<a href="{{ url_for('main.service_dashboard', service_id=value.service.id) }}" class="govuk-link govuk-link--no-visited-state govuk-!-font-size-24 govuk-!-font-weight-bold">{{ value.service.name }}</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endblock %}
|