mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 14:11:41 -04:00
- Removed links to the gov uk stylesheets
- Deleted /stylesheets folder - Removed sass build from gulpfile - Changed gov links to usa links - Changed other govuk styles, like breadcrumbs - Changed name of uk_components file to us_components - Fixed a few tests that broke on account of the changes
This commit is contained in:
@@ -231,7 +231,7 @@ def test_choose_account_should_show_back_to_service_link(
|
||||
):
|
||||
resp = client_request.get('main.choose_account')
|
||||
|
||||
service_navigation = resp.find('div', {'class': 'navigation-service'})
|
||||
service_navigation = resp.find('div', {'class': 'navigation-service usa-breadcrumb'})
|
||||
back_to_service_link = service_navigation.a
|
||||
|
||||
assert back_to_service_link['href'] == url_for('main.show_accounts_or_dashboard')
|
||||
@@ -248,7 +248,7 @@ def test_choose_account_should_not_show_back_to_service_link_if_no_service_in_se
|
||||
session['service_id'] = None
|
||||
page = client_request.get('main.choose_account')
|
||||
|
||||
assert len(page.select('.navigation-service a')) == 0
|
||||
assert len(page.select('.navigation-service usa-breadcrumb a')) == 0
|
||||
|
||||
|
||||
def test_choose_account_should_not_show_back_to_service_link_if_not_signed_in(
|
||||
@@ -262,7 +262,7 @@ def test_choose_account_should_not_show_back_to_service_link_if_not_signed_in(
|
||||
page = client_request.get('main.sign_in')
|
||||
|
||||
assert page.select_one('h1').text == 'Sign in' # We’re not signed in
|
||||
assert page.select_one('.navigation-service a') is None
|
||||
assert page.select_one('.navigation-service usa-breadcrumb a') is None
|
||||
|
||||
|
||||
@pytest.mark.parametrize('active', (
|
||||
|
||||
@@ -187,7 +187,7 @@ def test_service_settings_doesnt_show_option_if_parent_permission_disabled(
|
||||
def test_service_setting_toggles_dont_show(get_service_settings_page, service_one, service_fields, link_text):
|
||||
service_one.update(service_fields)
|
||||
page = get_service_settings_page()
|
||||
toggles = page.find_all('a', {'class': 'govuk-link'})
|
||||
toggles = page.find_all('a', {'class': 'usa-link'})
|
||||
assert not any(link for link in toggles if link_text in link.text)
|
||||
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ def test_can_show_notifications(
|
||||
)
|
||||
first_row = page.select_one('tbody tr')
|
||||
assert normalize_spaces(
|
||||
first_row.select_one('a.file-list-filename.govuk-link').text
|
||||
first_row.select_one('a.file-list-filename.usa-link').text
|
||||
) == (
|
||||
# Comes from
|
||||
# https://github.com/alphagov/notifications-admin/blob/8faffad508f9a087b0006989c197741c693cc2e2/tests/__init__.py#L436
|
||||
|
||||
@@ -119,7 +119,7 @@ def test_should_show_api_keys_page(
|
||||
):
|
||||
page = client_request.get('main.api_keys', service_id=SERVICE_ONE_ID)
|
||||
rows = [normalize_spaces(row.text) for row in page.select('main tr')]
|
||||
revoke_link = page.select_one('main tr a.govuk-link.govuk-link--destructive')
|
||||
revoke_link = page.select_one('main tr a.usa-link.usa-link--destructive')
|
||||
|
||||
assert rows[0] == 'API keys Action'
|
||||
assert rows[1] == f"another key name Revoked {format_datetime_short(date.fromtimestamp(0).isoformat())}"
|
||||
|
||||
@@ -238,8 +238,6 @@ def test_css_is_served_from_correct_path(client_request):
|
||||
page.select('link[rel=stylesheet]')
|
||||
):
|
||||
assert link['href'].startswith([
|
||||
'https://static.example.com/stylesheets/main.css?',
|
||||
'https://static.example.com/stylesheets/print.css?',
|
||||
'https://static.example.com/css/styles.css?',
|
||||
][index])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user