mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Don’t show the download until the job is complete
The CSV report isn’t very useful until it has all the rows from your original file. So we shouldn’t show you the link until all notifications have been created. Until this point, it’s useful to know how much longer you need to wait, so this commit adds a percentage count of how much of the file has been processed.
This commit is contained in:
@@ -858,6 +858,18 @@ 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_job_in_progress(mocker, api_user_active):
|
||||
def _get_job(service_id, job_id):
|
||||
return {"data": job_json(
|
||||
service_id, api_user_active, job_id=job_id,
|
||||
notification_count=10,
|
||||
notifications_sent=5
|
||||
)}
|
||||
|
||||
return mocker.patch('app.job_api_client.get_job', side_effect=_get_job)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_jobs(mocker, api_user_active):
|
||||
def _get_jobs(service_id, limit_days=None):
|
||||
|
||||
Reference in New Issue
Block a user