mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Don’t show cancelled jobs anywhere
The information about a job doesn’t make sense if a job is cancelled. We could change the information to reflect that the job won’t be sent/ wasn’t sent/was cancelled, but there’s nothing you can really do with this info. So instead let’s: - hide cancelled jobs from the dashboard - hide cancelled jobs from the jobs page - 404 the page if the user tries to click back enough times to hit the job page
This commit is contained in:
@@ -149,6 +149,25 @@ def test_should_show_scheduled_job(
|
||||
assert page.find('main').find_all('p')[2].text.strip() == 'Sending will start at midnight'
|
||||
|
||||
|
||||
def test_should_not_show_cancelled_job(
|
||||
app_,
|
||||
service_one,
|
||||
active_user_with_permissions,
|
||||
mock_get_cancelled_job,
|
||||
mocker,
|
||||
fake_uuid
|
||||
):
|
||||
with app_.test_request_context(), app_.test_client() as client:
|
||||
client.login(active_user_with_permissions, mocker, service_one)
|
||||
response = client.get(url_for(
|
||||
'main.view_job',
|
||||
service_id=service_one['id'],
|
||||
job_id=fake_uuid
|
||||
))
|
||||
|
||||
assert response.status_code == 404
|
||||
|
||||
|
||||
def test_should_show_not_show_csv_download_in_tour(
|
||||
app_,
|
||||
service_one,
|
||||
|
||||
Reference in New Issue
Block a user