Show message on job page if job is scheduled

If a job is scheduled then we can’t show the notifications yet, and the
progress report will stay at 0%.

In their place we should show what time a job will start.

Later on (when the API is ready) this area of the page should also show
a cancel button.
This commit is contained in:
Chris Hill-Scott
2016-08-25 16:49:31 +01:00
parent 4342b721f1
commit 31a032e678
4 changed files with 103 additions and 56 deletions

View File

@@ -858,6 +858,20 @@ def mock_get_job(mocker, api_user_active):
return mocker.patch('app.job_api_client.get_job', side_effect=_get_job)
@pytest.fixture(scope='function')
def mock_get_scheduled_job(mocker, api_user_active):
def _get_job(service_id, job_id):
return {"data": job_json(
service_id,
api_user_active,
job_id=job_id,
job_status='scheduled',
scheduled_for='2016-01-01T00:00:00.061258'
)}
return mocker.patch('app.job_api_client.get_job', side_effect=_get_job)
@pytest.fixture(scope='function')
def mock_get_job_in_progress(mocker, api_user_active):
def _get_job(service_id, job_id):