mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Use relative dates for jobs on dashboard
For scheduled files we say ‘sending today at 5:00pm’ or ‘sending tomorrow at 11:00am’. But once we’ve started processing these files we say ‘Sent 27 September at 5:00pm’. This makes it sound like 27 September is not today. This commit makes the dates shown on the dashboard consistent, by saying ‘today’ and ‘yesterday’ instead of absolute dates.
This commit is contained in:
@@ -774,7 +774,7 @@ def test_should_show_recent_jobs_on_dashboard(
|
||||
"thisisatest.csv",
|
||||
)):
|
||||
assert filename in table_rows[index].find_all('th')[0].text
|
||||
assert 'Sent 1 January at 11:09' in table_rows[index].find_all('th')[0].text
|
||||
assert 'Sent today at 11:09' in table_rows[index].find_all('th')[0].text
|
||||
for column_index, count in enumerate((1, 0, 0)):
|
||||
assert table_rows[index].find_all('td')[column_index].text.strip() == str(count)
|
||||
|
||||
|
||||
@@ -24,19 +24,19 @@ from tests.conftest import (
|
||||
),
|
||||
(
|
||||
'export 1/1/2016.xls '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'all email addresses.xlsx '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'applicants.ods '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'thisisatest.csv '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
)),
|
||||
(active_caseworking_user, (
|
||||
@@ -56,19 +56,19 @@ from tests.conftest import (
|
||||
),
|
||||
(
|
||||
'export 1/1/2016.xls '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'all email addresses.xlsx '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'applicants.ods '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'thisisatest.csv '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
)),
|
||||
])
|
||||
@@ -129,19 +129,19 @@ def test_jobs_page_doesnt_show_scheduled_on_page_2(
|
||||
),
|
||||
(
|
||||
'export 1/1/2016.xls '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'all email addresses.xlsx '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'applicants.ods '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
(
|
||||
'thisisatest.csv '
|
||||
'Sent 12 December at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
),
|
||||
)):
|
||||
assert normalize_spaces(page.select('tr')[index].text) == row
|
||||
|
||||
Reference in New Issue
Block a user