mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-12 17:34:16 -04:00
Fix tests broken by changes to HTML
This commit is contained in:
@@ -43,7 +43,7 @@ def test_organisation_page_shows_all_organisations(
|
||||
expected_hints = ('0 live services', '1 live service', '2 live services')
|
||||
|
||||
for index, org in enumerate(orgs):
|
||||
assert page.select('a.browse-list-link')[index].text == org['name']
|
||||
assert page.select('.browse-list-item a')[index].text == org['name']
|
||||
if not org['active']:
|
||||
assert page.select_one('.table-field-status-default,heading-medium').text == '- archived'
|
||||
assert normalize_spaces(page.select('.browse-list-hint')[index].text) == (
|
||||
|
||||
@@ -28,7 +28,7 @@ class _MockS3Object():
|
||||
partial(url_for, 'main.request_to_go_live', service_id=SERVICE_ONE_ID),
|
||||
),
|
||||
(
|
||||
[],
|
||||
['govuk-link', 'govuk-link--no-visited-state'],
|
||||
partial(url_for, 'main.service_download_agreement', service_id=SERVICE_ONE_ID),
|
||||
),
|
||||
]
|
||||
@@ -41,7 +41,7 @@ class _MockS3Object():
|
||||
partial(url_for, 'main.request_to_go_live', service_id=SERVICE_ONE_ID),
|
||||
),
|
||||
(
|
||||
[],
|
||||
['govuk-link', 'govuk-link--no-visited-state'],
|
||||
partial(url_for, 'main.service_download_agreement', service_id=SERVICE_ONE_ID),
|
||||
),
|
||||
(
|
||||
@@ -58,7 +58,7 @@ class _MockS3Object():
|
||||
partial(url_for, 'main.request_to_go_live', service_id=SERVICE_ONE_ID),
|
||||
),
|
||||
(
|
||||
[],
|
||||
['govuk-link', 'govuk-link--no-visited-state'],
|
||||
partial(url_for, 'main.service_download_agreement', service_id=SERVICE_ONE_ID),
|
||||
),
|
||||
(
|
||||
@@ -75,7 +75,7 @@ class _MockS3Object():
|
||||
partial(url_for, 'main.request_to_go_live', service_id=SERVICE_ONE_ID),
|
||||
),
|
||||
(
|
||||
[],
|
||||
['govuk-link', 'govuk-link--no-visited-state'],
|
||||
partial(url_for, 'main.support'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -25,7 +25,7 @@ def test_find_services_by_name_displays_services_found(
|
||||
_expected_status=200
|
||||
)
|
||||
get_services.assert_called_once_with(service_name="Test Service")
|
||||
result = document.find('a', {'class': 'browse-list-link'})
|
||||
result = document.select_one('.browse-list-item a')
|
||||
assert result.text.strip() == 'Test Service'
|
||||
assert result.attrs["href"] == "/services/1234"
|
||||
|
||||
@@ -42,7 +42,7 @@ def test_find_services_by_name_displays_multiple_services(
|
||||
)
|
||||
document = client_request.post('main.find_services_by_name', _data={"search": "Tadfield"}, _expected_status=200)
|
||||
|
||||
results = document.findAll('a', {'class': 'browse-list-link'})
|
||||
results = document.select('.browse-list-item a')
|
||||
assert len(results) == 2
|
||||
assert sorted([result.text.strip() for result in results]) == ["Tadfield Air Base", "Tadfield Police"]
|
||||
|
||||
|
||||
@@ -550,7 +550,7 @@ def test_cant_edit_user_folder_permissions_for_platform_admin_users(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
user_id=platform_admin_user['id'],
|
||||
)
|
||||
assert normalize_spaces(page.select('main p')[0].text) == 'platform@admin.gov.uk Change'
|
||||
assert normalize_spaces(page.select('main p')[0].text) == 'platform@admin.gov.uk Change email address'
|
||||
assert normalize_spaces(page.select('main p')[2].text) == (
|
||||
'Platform admin users can access all template folders.'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user