mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 06:01:46 -04:00
Show all statistics fetched on the dashboard
We want to align all our stats to be for the last 7 days. This means summing up the stats response from the API to make the Big Number. Previously the big number was counting sent notifications as successful. This commit changes it to only look at delivered notifications. Right now, the API doesn’t have a way of filtering to only show the last 7 days. So for the moment the dashboard will show statistics for all time. The upshot of this is that we can link from the dashboard to the activity page when there are failures.
This commit is contained in:
@@ -83,9 +83,9 @@ def test_should_show_recent_templates_on_dashboard(app_,
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
headers = [header.text.strip() for header in page.find_all('h2')]
|
||||
assert 'Test Service' in headers
|
||||
assert 'Sent today' in headers
|
||||
assert 'In the last 7 days' in headers
|
||||
template_usage_headers = [th.text.strip() for th in page.thead.find_all('th')]
|
||||
for th in ['Template', 'Type', 'Messages sent']:
|
||||
for th in ['Template', 'Type', 'Messages processed']:
|
||||
assert th in template_usage_headers
|
||||
table_rows = page.tbody.find_all('tr')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user