Make data consistent from dashboard -> job

- adds a table of recent activity to the job page, which is shared by the
  dashboard page
- uses the same filename and message template as the first job shown on the
  dashboard
- sets the time of file uploads/message delivery/message sending to always
  match ‘just now’
This commit is contained in:
Chris Hill-Scott
2015-12-18 10:26:56 +00:00
parent 0e6dab3f5c
commit 31e6e53d46
10 changed files with 152 additions and 82 deletions

View File

@@ -0,0 +1,6 @@
def test_should_show_recent_jobs_on_dashboard(notifications_admin):
response = notifications_admin.test_client().get('/dashboard')
assert response.status_code == 200
assert 'Test message 1' in response.get_data(as_text=True)
assert 'Asdfgg' in response.get_data(as_text=True)

View File

@@ -2,14 +2,16 @@ def test_should_return_list_of_all_jobs(notifications_admin):
response = notifications_admin.test_client().get('/jobs')
assert response.status_code == 200
assert 'This page will be where we show the list of jobs that this service has processed' in response.get_data(as_text=True) # noqa
assert 'Test message 1' in response.get_data(as_text=True)
assert 'Final reminder' in response.get_data(as_text=True)
def test_should_show_page_for_one_job(notifications_admin):
response = notifications_admin.test_client().get('/jobs/job')
assert response.status_code == 200
assert 'contact-demo.csv sent with Reminder template' in response.get_data(as_text=True)
assert 'dispatch_20151114.csv' in response.get_data(as_text=True)
assert 'Test message 1' in response.get_data(as_text=True)
def test_should_show_page_for_one_notification(notifications_admin):