Sort contact lists appropriately

On the uploads page this should be newest first, same as the scheduled
and immediate jobs on this page.

On the _choose_ page this should be alphabetical, same as choosing a
template.
This commit is contained in:
Chris Hill-Scott
2020-03-16 11:05:26 +00:00
parent 050f98fea6
commit b99216173e
3 changed files with 24 additions and 11 deletions

View File

@@ -717,7 +717,6 @@ def test_uploads_page_shows_scheduled_jobs(
def test_uploads_page_shows_contact_lists_first(
mocker,
client_request,
fake_uuid,
mock_get_no_uploads,
mock_get_jobs,
mock_get_contact_lists,
@@ -730,16 +729,16 @@ def test_uploads_page_shows_contact_lists_first(
(
'File Status'
),
(
'EmergencyContactList.xls '
'Uploaded 13 March at 10:59am '
'100 saved email addresses'
),
(
'phone number list.csv '
'Uploaded 13 March at 1:00pm '
'123 saved phone numbers'
),
(
'EmergencyContactList.xls '
'Uploaded 13 March at 10:59am '
'100 saved email addresses'
),
(
'even_later.csv '
'Sending 1 January 2016 at 11:09pm '
@@ -754,7 +753,7 @@ def test_uploads_page_shows_contact_lists_first(
assert page.select_one('.file-list-filename-large')['href'] == url_for(
'main.contact_list',
service_id=SERVICE_ONE_ID,
contact_list_id=fake_uuid,
contact_list_id='d7b0bd1a-d1c7-4621-be5c-3c1b4278a2ad',
)