mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-26 19:18:28 -04:00
broadcast-areas: view test does not assert order
the descriptions are liable to change esp for wards Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
This commit is contained in:
@@ -226,25 +226,21 @@ def test_choose_broadcast_library_page(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
broadcast_message_id=fake_uuid,
|
||||
)
|
||||
assert [
|
||||
(normalize_spaces(title.text), normalize_spaces(hint.text))
|
||||
for title, hint in list(zip(
|
||||
page.select('.file-list-filename-large'), page.select('.file-list-hint-large')
|
||||
))
|
||||
] == [
|
||||
(
|
||||
'Counties and Unitary Authorities in England and Wales',
|
||||
'Barking and Dagenham, Barnet, Barnsley and 171 more…',
|
||||
),
|
||||
(
|
||||
'Countries',
|
||||
'England, Northern Ireland, Scotland and Wales',
|
||||
),
|
||||
(
|
||||
'Regions of England',
|
||||
'East Midlands, East of England, London and 6 more…',
|
||||
),
|
||||
|
||||
titles = [
|
||||
normalize_spaces(title.text)
|
||||
for title in page.select('.file-list-filename-large')
|
||||
]
|
||||
assert sorted(titles) == sorted([
|
||||
'Counties and Unitary Authorities in England and Wales',
|
||||
'Countries',
|
||||
'Regions of England',
|
||||
])
|
||||
|
||||
hints = page.select('.file-list-hint-large')
|
||||
for country in ('England, Northern Ireland, Scotland, Wales'):
|
||||
assert country in hints
|
||||
|
||||
assert page.select_one('a.file-list-filename-large.govuk-link')['href'] == url_for(
|
||||
'.choose_broadcast_area',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
|
||||
Reference in New Issue
Block a user