mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-10 11:24:10 -04:00
Add a message if there are more than 50 rows
Similar to how we do it on the check page, we should indicate if there are more results than we can show. No-one’s really complained about the absence of this, but it can’t hurt.
This commit is contained in:
@@ -50,6 +50,12 @@
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
|
||||
{% if more_than_one_page %}
|
||||
<p class="table-show-more-link">
|
||||
Only showing the first 50 rows
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if notifications %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -95,6 +95,7 @@ def test_should_show_page_for_one_job(
|
||||
)
|
||||
assert csv_link.text == 'Download this report'
|
||||
assert page.find('span', {'id': 'time-left'}).text == 'Data available for 7 days'
|
||||
assert page.find('p', {'class': 'table-show-more-link'}).text.strip() == 'Only showing the first 50 rows'
|
||||
mock_get_notifications.assert_called_with(
|
||||
service_one['id'],
|
||||
fake_uuid,
|
||||
|
||||
@@ -910,14 +910,16 @@ def mock_get_notifications(mocker, api_user_active):
|
||||
template={'template_type': set_template_type, 'name': 'name', 'id': 'id', 'version': 1},
|
||||
rows=rows,
|
||||
status=set_status,
|
||||
job=job
|
||||
job=job,
|
||||
with_links=True
|
||||
)
|
||||
else:
|
||||
return notification_json(
|
||||
service_id,
|
||||
rows=rows,
|
||||
status=set_status,
|
||||
job=job
|
||||
job=job,
|
||||
with_links=True
|
||||
)
|
||||
|
||||
return mocker.patch(
|
||||
|
||||
Reference in New Issue
Block a user