mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-19 14:03:52 -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])
|
||||
|
||||
|
||||
@@ -517,7 +517,7 @@ describe('Live search', () => {
|
||||
</div>
|
||||
</div>
|
||||
<li class="tick-cross-list-edit-link">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="/services/6658542f-0cad-491f-bec8-ab8457700ead/cancel-invited-user/21d6d54f-51e2-44ba-b48f-545d678c4c64">Cancel invitation</a>
|
||||
<a class="usa-link" href="/services/6658542f-0cad-491f-bec8-ab8457700ead/cancel-invited-user/21d6d54f-51e2-44ba-b48f-545d678c4c64">Cancel invitation</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>`);
|
||||
|
||||
@@ -752,7 +752,7 @@ describe("Stick to top/bottom of window when scrolling", () => {
|
||||
<p>This is a paragraph with a horizontal line underneath.</p>
|
||||
<hr>
|
||||
<p>This is a paragraph with a horizontal line above.</p>
|
||||
<p>This paragraph has a link in it: <a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk">https://www.gov.uk</a>.</p>
|
||||
<p>This paragraph has a link in it: <a class="usa-link" href="https://www.gov.uk">https://www.gov.uk</a>.</p>
|
||||
</div>
|
||||
<div class="page-footer js-stick-at-bottom-when-scrolling">
|
||||
<form method="post" action="">
|
||||
|
||||
@@ -48,7 +48,7 @@ function templatesAndFoldersCheckboxes (hierarchy) {
|
||||
<label class="usa-checkbox__label template-list-item-label margin-top-05" for="templates-or-folder-${idx}">
|
||||
<span class="usa-sr-only">${node.label}</span>
|
||||
</label>
|
||||
<a href="/services/6658542f-0cad-491f-bec8-ab8457700ead/templates/all/folders/3d057d9a-51fc-45ea-8b63-0003206350a6" class="govuk-link govuk-link--no-visited-state template-list-${node.type === 'folder' ? 'folder' : 'template'}">
|
||||
<a href="/services/6658542f-0cad-491f-bec8-ab8457700ead/templates/all/folders/3d057d9a-51fc-45ea-8b63-0003206350a6" class="usa-link template-list-${node.type === 'folder' ? 'folder' : 'template'}">
|
||||
<span class="live-search-relevant">${node.label}</span>
|
||||
</a>
|
||||
${node.meta}
|
||||
|
||||
@@ -293,7 +293,7 @@ describe('Update content', () => {
|
||||
<div class="keyline-block">
|
||||
<div class="file-list govuk-!-margin-bottom-2">
|
||||
<h2>
|
||||
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="/services/7597847f-ad8e-4600-8faf-c42a647d8dee/current-alerts/b9e53cda-54f9-47bc-9fb2-b78a11eda6a9">${content.title}</a>
|
||||
<a class="file-list-filename-large usa-link" href="/services/7597847f-ad8e-4600-8faf-c42a647d8dee/current-alerts/b9e53cda-54f9-47bc-9fb2-b78a11eda6a9">${content.title}</a>
|
||||
</h2>
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
|
||||
Reference in New Issue
Block a user