mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Differentiate between different kinds of uploads
Knowing what kind of upload a thing is is useful. And the information that is useful to show about each upload depends on what kind of upload it is.
This commit is contained in:
@@ -937,8 +937,11 @@ def test_should_show_recent_jobs_on_dashboard(
|
||||
)):
|
||||
assert filename in table_rows[index].find_all('th')[0].text
|
||||
assert 'Sent today at 11:09' in table_rows[index].find_all('th')[0].text
|
||||
for column_index, count in enumerate((1, 0, 0)):
|
||||
assert table_rows[index].find_all('td')[column_index].text.strip() == str(count)
|
||||
assert normalize_spaces(
|
||||
table_rows[index].select_one('td').text
|
||||
) == (
|
||||
'1 sending 0 delivered 0 failed'
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('extra_permissions', (
|
||||
|
||||
@@ -21,23 +21,23 @@ from tests.conftest import (
|
||||
@pytest.mark.parametrize('user, expected_rows', [
|
||||
(create_active_user_with_permissions(), (
|
||||
(
|
||||
'File Sending Delivered Failed'
|
||||
'File Status'
|
||||
),
|
||||
(
|
||||
'export 1/1/2016.xls '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'all email addresses.xlsx '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'applicants.ods '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'thisisatest.csv '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
)),
|
||||
(create_active_caseworking_user(), (
|
||||
@@ -53,23 +53,23 @@ from tests.conftest import (
|
||||
'Sending 1 January 2016 at 11:09pm 1'
|
||||
),
|
||||
(
|
||||
'File Sending Delivered Failed'
|
||||
'File Status'
|
||||
),
|
||||
(
|
||||
'export 1/1/2016.xls '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'all email addresses.xlsx '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'applicants.ods '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'thisisatest.csv '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
)),
|
||||
])
|
||||
@@ -123,23 +123,23 @@ def test_jobs_page_doesnt_show_scheduled_on_page_2(
|
||||
|
||||
for index, row in enumerate((
|
||||
(
|
||||
'File Sending Delivered Failed'
|
||||
'File Status'
|
||||
),
|
||||
(
|
||||
'export 1/1/2016.xls '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'all email addresses.xlsx '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'applicants.ods '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
(
|
||||
'thisisatest.csv '
|
||||
'Sent today at 12:12pm 1 0 0'
|
||||
'Sent today at 12:12pm 1 sending 0 delivered 0 failed'
|
||||
),
|
||||
)):
|
||||
assert normalize_spaces(page.select('tr')[index].text) == row
|
||||
|
||||
@@ -77,11 +77,11 @@ def test_get_upload_hub_page(
|
||||
)
|
||||
|
||||
assert page.find_all(
|
||||
'a', {'class': 'file-list-filename'}
|
||||
'a', {'class': 'file-list-filename-large'}
|
||||
)[0].attrs['href'] == '/services/{}/jobs/job_id_1'.format(SERVICE_ONE_ID)
|
||||
|
||||
assert page.find_all(
|
||||
'a', {'class': 'file-list-filename'}
|
||||
'a', {'class': 'file-list-filename-large'}
|
||||
)[1].attrs['href'] == '/services/{}/notification/letter_id_1'.format(SERVICE_ONE_ID)
|
||||
|
||||
|
||||
@@ -643,15 +643,17 @@ def test_uploads_page_shows_scheduled_jobs(
|
||||
normalize_spaces(row.text) for row in page.select('tr')
|
||||
] == [
|
||||
(
|
||||
'File Sending Delivered Failed'
|
||||
'File Status'
|
||||
),
|
||||
(
|
||||
'send_me_later.csv '
|
||||
'Sent 1 January 2016 at 11:09am 0 0 0'
|
||||
'Sending 1 January 2016 at 11:09am '
|
||||
'1 text message waiting to send'
|
||||
),
|
||||
(
|
||||
'even_later.csv '
|
||||
'Sent 1 January 2016 at 11:09pm 0 0 0'
|
||||
'Sending 1 January 2016 at 11:09pm '
|
||||
'1 text message waiting to send'
|
||||
),
|
||||
]
|
||||
assert not page.select('.table-empty-message')
|
||||
|
||||
Reference in New Issue
Block a user