diff --git a/tests/app/main/views/organisations/test_organisation.py b/tests/app/main/views/organisations/test_organisation.py index a5ca8fe2c..087234de5 100644 --- a/tests/app/main/views/organisations/test_organisation.py +++ b/tests/app/main/views/organisations/test_organisation.py @@ -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) == ( diff --git a/tests/app/main/views/test_agreement.py b/tests/app/main/views/test_agreement.py index 14ba04a04..bf8862e82 100644 --- a/tests/app/main/views/test_agreement.py +++ b/tests/app/main/views/test_agreement.py @@ -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'), ), ] diff --git a/tests/app/main/views/test_find_services.py b/tests/app/main/views/test_find_services.py index d6ffae576..1b3884930 100644 --- a/tests/app/main/views/test_find_services.py +++ b/tests/app/main/views/test_find_services.py @@ -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"] diff --git a/tests/app/main/views/test_manage_users.py b/tests/app/main/views/test_manage_users.py index 34abf5c44..adaef8186 100644 --- a/tests/app/main/views/test_manage_users.py +++ b/tests/app/main/views/test_manage_users.py @@ -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.' )