mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 08:31:00 -04:00
Use days of week, not month for scheduled jobs
Friday at 4pm is easier to understand than 14 October at 4pm, especially when the UI you’ve used to choose this time has talked about days of the week.
This commit is contained in:
@@ -194,10 +194,10 @@ def test_should_show_upcoming_jobs_on_dashboard(
|
||||
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 'Sending today 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 'Sending today at 11:09pm' in table_rows[1].find_all('th')[0].text
|
||||
assert table_rows[1].find_all('td')[0].text.strip() == '1'
|
||||
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ def test_should_show_job_in_progress(
|
||||
assert page.find('p', {'class': 'hint'}).text.strip() == 'Report is 50% complete…'
|
||||
|
||||
|
||||
@freeze_time("2016-01-01T00:00:00.061258")
|
||||
def test_should_show_scheduled_job(
|
||||
app_,
|
||||
service_one,
|
||||
@@ -162,7 +163,7 @@ def test_should_show_scheduled_job(
|
||||
|
||||
assert response.status_code == 200
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.find('main').find_all('p')[2].text.strip() == 'Sending will start at midnight'
|
||||
assert page.find('main').find_all('p')[2].text.strip() == 'Sending will start today at midnight'
|
||||
assert page.find('input', {'type': 'submit', 'value': 'Cancel sending'})
|
||||
|
||||
|
||||
|
||||
@@ -903,7 +903,7 @@ def mock_get_scheduled_job(mocker, api_user_active):
|
||||
api_user_active,
|
||||
job_id=job_id,
|
||||
job_status='scheduled',
|
||||
scheduled_for='2016-01-01T00:00:00.061258'
|
||||
scheduled_for='2016-01-02T00:00:00.061258'
|
||||
)}
|
||||
|
||||
return mocker.patch('app.job_api_client.get_job', side_effect=_get_job)
|
||||
|
||||
Reference in New Issue
Block a user