mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Sort scheduled jobs so soonest is first
The scheduled job you probably care about the most is the soonest – irrespective of when you scheduled it.
This commit is contained in:
@@ -184,11 +184,14 @@ def test_should_show_upcoming_jobs_on_dashboard(
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
|
||||
table_rows = page.find_all('tbody')[0].find_all('tr')
|
||||
assert len(table_rows) == 1
|
||||
assert len(table_rows) == 2
|
||||
|
||||
assert 'send_me_later.csv' in table_rows[0].find_all('th')[0].text
|
||||
assert 'Sending at 11:09am' in table_rows[0].find_all('th')[0].text
|
||||
assert table_rows[0].find_all('td')[0].text.strip() == '1'
|
||||
assert 'even_later.csv' in table_rows[1].find_all('th')[0].text
|
||||
assert 'Sending at 11:09pm' in table_rows[1].find_all('th')[0].text
|
||||
assert table_rows[1].find_all('td')[0].text.strip() == '1'
|
||||
|
||||
|
||||
@freeze_time("2016-01-01 11:09:00.061258")
|
||||
|
||||
@@ -902,7 +902,8 @@ def mock_get_jobs(mocker, api_user_active):
|
||||
("all email addresses.xlsx", '', 'pending'),
|
||||
("applicants.ods", '', ''),
|
||||
("thisisatest.csv", '', ''),
|
||||
("send_me_later.csv", '2016-01-01 11:09:00.061258', 'scheduled')
|
||||
("send_me_later.csv", '2016-01-01 11:09:00.061258', 'scheduled'),
|
||||
("even_later.csv", '2016-01-01 23:09:00.061258', 'scheduled')
|
||||
)
|
||||
]}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user