From a574fc7b3ac15f4ae439fcd759712f851878c397 Mon Sep 17 00:00:00 2001 From: Jonathan Bobel Date: Thu, 17 Aug 2023 15:13:26 -0400 Subject: [PATCH] Working through the Platform Admin section --- .../uswds/_uswds-theme-custom-styles.scss | 22 +++++++++++++++++++ app/assets/sass/uswds/_uswds-theme.scss | 2 +- app/main/forms.py | 2 +- app/templates/components/list-entry.html | 2 +- .../us_components/details/template.njk | 2 +- .../us_components/input/template.njk | 2 +- .../callbacks/delivery-status-callback.html | 4 ++-- .../received-text-messages-callback.html | 4 ++-- app/templates/views/edit-email-template.html | 2 +- app/templates/views/edit-sms-template.html | 2 +- .../views/email-branding/select-branding.html | 14 ++++++------ .../find-services/find-services-by-name.html | 9 ++------ .../views/find-users/find-users-by-email.html | 10 +++------ app/templates/views/inbound-sms-admin.html | 6 +---- app/templates/views/invite-user.html | 2 +- .../views/manage-users/edit-user-email.html | 2 +- .../edit-organization-billing-details.html | 8 +++---- .../organization/users/invite-org-user.html | 2 +- app/templates/views/platform-admin/index.html | 2 +- .../views/platform-admin/services.html | 2 +- app/templates/views/send-test.html | 2 +- .../edit-service-billing-details.html | 8 +++---- .../email-reply-to/_verify-updates.html | 2 +- .../service-settings/email-reply-to/add.html | 2 +- .../service-settings/email-reply-to/edit.html | 2 +- .../service-settings/send-files-by-email.html | 2 +- app/templates/views/support/form.html | 4 ++-- app/templates/views/templates/_move_to.html | 4 ++-- .../templates/manage-template-folder.html | 2 +- .../views/organizations/test_organizations.py | 4 ++-- .../service_settings/test_service_settings.py | 2 +- tests/app/main/views/test_email_branding.py | 2 +- tests/app/main/views/test_find_users.py | 10 ++++----- tests/app/main/views/test_manage_users.py | 2 +- tests/app/main/views/test_tour.py | 2 +- tests/javascripts/listEntry.test.js | 2 +- tests/javascripts/templateFolderForm.test.js | 4 ++-- 37 files changed, 83 insertions(+), 74 deletions(-) diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index 4f633fc00..3bbc9ddbb 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -47,6 +47,12 @@ p, font-size: size("body", 6); } +ul { + padding: 0; + margin: 0; + list-style: none; +} + .large-number { font-size: size("body", 16); } @@ -355,3 +361,19 @@ td.table-empty-message { } } } + +// Etc + +.email-brand, .browse-list { + padding: 0; + margin: 0; + list-style: none; + margin-bottom: units(2); + li { + padding: 8px 0; + } +} + +details form { + box-sizing:border-box; +} diff --git a/app/assets/sass/uswds/_uswds-theme.scss b/app/assets/sass/uswds/_uswds-theme.scss index b588e264d..339cbd5e4 100644 --- a/app/assets/sass/uswds/_uswds-theme.scss +++ b/app/assets/sass/uswds/_uswds-theme.scss @@ -7,7 +7,7 @@ in the form $setting: value, ---------------------------------------- */ -@use "uswds-core" with ( +@use "uswds-global" with ( $theme-font-type-sans: "public-sans", $theme-show-notifications: false ); diff --git a/app/main/forms.py b/app/main/forms.py index b4a4994e6..a23736ced 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -313,7 +313,7 @@ class GovukSearchField(SearchField): # this bypasses that by making self.widget a method with the same interface as widget.__call__ def widget(self, field, param_extensions=None, **kwargs): - params = {"classes": "govuk-!-width-full"} # email addresses don't need to be spellchecked + params = {"classes": ""} # email addresses don't need to be spellchecked merge_jsonlike(params, param_extensions) return govuk_text_input_field_widget(self, field, type="search", param_extensions=params, **kwargs) diff --git a/app/templates/components/list-entry.html b/app/templates/components/list-entry.html index 7b41b40dd..ae80f5950 100644 --- a/app/templates/components/list-entry.html +++ b/app/templates/components/list-entry.html @@ -48,7 +48,7 @@ "html": '' + item_name + ' number ' + loop.index|string + '.', "classes": label_classes }, - "classes": "govuk-input--numbered govuk-!-width-full", + "classes": "govuk-input--numbered ", "value": field.data[loop.index0], "autocomplete": autocomplete }) }} diff --git a/app/templates/components/us_components/details/template.njk b/app/templates/components/us_components/details/template.njk index 999a7ec0d..76b380594 100644 --- a/app/templates/components/us_components/details/template.njk +++ b/app/templates/components/us_components/details/template.njk @@ -1,4 +1,4 @@ -
+
{{ params.summaryHtml | safe if params.summaryHtml else params.summaryText }} diff --git a/app/templates/components/us_components/input/template.njk b/app/templates/components/us_components/input/template.njk index b4d8ce555..8813370c5 100644 --- a/app/templates/components/us_components/input/template.njk +++ b/app/templates/components/us_components/input/template.njk @@ -5,7 +5,7 @@ {#- a record of other elements that we need to associate with the input using aria-describedby – for example hints or error messages -#} {% set describedBy = params.describedBy if params.describedBy else "" %} -
+
{{ govukLabel({ html: params.label.html, text: params.label.text, diff --git a/app/templates/views/api/callbacks/delivery-status-callback.html b/app/templates/views/api/callbacks/delivery-status-callback.html index 92cc14ab2..c2b5cc9fa 100644 --- a/app/templates/views/api/callbacks/delivery-status-callback.html +++ b/app/templates/views/api/callbacks/delivery-status-callback.html @@ -26,12 +26,12 @@ {% call form_wrapper() %} {{ form.url(param_extensions={ - "classes": "govuk-!-width-full", + "classes": "", "hint": {"text": "Must start with https://"} }) }} {{ form.bearer_token(param_extensions={ - "classes": "govuk-!-width-full", + "classes": "", "hint": {"text": "At least 10 characters"}, "autocomplete": "new-password" }) }} diff --git a/app/templates/views/api/callbacks/received-text-messages-callback.html b/app/templates/views/api/callbacks/received-text-messages-callback.html index 2bfc0d2dd..dbb80ddf5 100644 --- a/app/templates/views/api/callbacks/received-text-messages-callback.html +++ b/app/templates/views/api/callbacks/received-text-messages-callback.html @@ -23,12 +23,12 @@ {% call form_wrapper() %} {{ form.url(param_extensions={ - "classes": "govuk-!-width-full", + "classes": "", "hint": {"text": "Must start with https://"} }) }} {{ form.bearer_token(param_extensions={ - "classes": "govuk-!-width-full", + "classes": "", "hint": {"text": "At least 10 characters"}, "autocomplete": "new-password" }) }} diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html index 04864123b..9dfa39669 100644 --- a/app/templates/views/edit-email-template.html +++ b/app/templates/views/edit-email-template.html @@ -23,7 +23,7 @@
{{ form.name(param_extensions={ - "classes": "govuk-!-width-full", + "classes": "", "hint": {"text": "Your recipients will not see this"} }) }} {{ textbox(form.subject, width='1-1', highlight_placeholders=True, rows=2) }} diff --git a/app/templates/views/edit-sms-template.html b/app/templates/views/edit-sms-template.html index b10266459..2fa560397 100644 --- a/app/templates/views/edit-sms-template.html +++ b/app/templates/views/edit-sms-template.html @@ -35,7 +35,7 @@
{{ form.name(param_extensions={ - "classes": "govuk-!-width-full", + "classes": "", "hint": {"text": "Your recipients will not see this"} }) }} {{ textbox( diff --git a/app/templates/views/email-branding/select-branding.html b/app/templates/views/email-branding/select-branding.html index a15a86b2e..d366d3f2b 100644 --- a/app/templates/views/email-branding/select-branding.html +++ b/app/templates/views/email-branding/select-branding.html @@ -12,17 +12,17 @@ {% block platform_admin_content %}

{{ page_title }}

- {{ live_search(target_selector='.email-brand', show=True, form=search_form, autofocus=True) }} + {{ live_search(target_selector='.message-name', show=True, form=search_form, autofocus=True) }}
{{ govukButton({ diff --git a/app/templates/views/find-services/find-services-by-name.html b/app/templates/views/find-services/find-services-by-name.html index 336cb41eb..46b4cbc0a 100644 --- a/app/templates/views/find-services/find-services-by-name.html +++ b/app/templates/views/find-services/find-services-by-name.html @@ -16,20 +16,16 @@ {% call form_wrapper( action=url_for('.find_services_by_name'), - class='govuk-grid-row' + class='usa-search margin-bottom-4' ) %} -
{{ form.search(param_extensions={ "label": {"text": "Find services by name, partial name, or service ID"} }) }} -
-
{{ govukButton({ "text": "Search", - "classes": "search-form__button" + "classes": "usa-button search-form__button" }) }} -
{% endcall %} {% call form_wrapper(id='search-form' ) %} @@ -43,7 +39,6 @@
  • {{ service.name }}
  • -
    {% endfor %} diff --git a/app/templates/views/find-users/find-users-by-email.html b/app/templates/views/find-users/find-users-by-email.html index a52c76d0e..3e9e0a92d 100644 --- a/app/templates/views/find-users/find-users-by-email.html +++ b/app/templates/views/find-users/find-users-by-email.html @@ -16,20 +16,16 @@ {% call form_wrapper( action=url_for('.find_users_by_email'), - class='govuk-grid-row' + class='usa-search margin-bottom-4' ) %} -
    {{ form.search(param_extensions={ "label": {"text": "Find users by email, or by partial email"} }) }} -
    -
    {{ govukButton({ "text": "Search", "classes": "search-form__button" }) }} -
    {% endcall %} {% call form_wrapper(id='search-form' ) %} @@ -42,9 +38,9 @@ {% for user in users_found %}
  • {{ user.email_address }} -

    {{ user.name }}

    + - + {{ user.name }}
  • -
    {% endfor %} diff --git a/app/templates/views/inbound-sms-admin.html b/app/templates/views/inbound-sms-admin.html index a9b8c36d4..f7959d8a9 100644 --- a/app/templates/views/inbound-sms-admin.html +++ b/app/templates/views/inbound-sms-admin.html @@ -24,11 +24,7 @@ Inbound SMS Inbound SMS - - - - - +
    diff --git a/app/templates/views/invite-user.html b/app/templates/views/invite-user.html index e665581d4..4f75dec1d 100644 --- a/app/templates/views/invite-user.html +++ b/app/templates/views/invite-user.html @@ -25,7 +25,7 @@ {% else %} {{ form.email_address( param_extensions={ - "classes": "govuk-!-width-full" + "classes": "" }, error_message_with_html=True ) }} diff --git a/app/templates/views/manage-users/edit-user-email.html b/app/templates/views/manage-users/edit-user-email.html index 86dd24868..9bb67dd94 100644 --- a/app/templates/views/manage-users/edit-user-email.html +++ b/app/templates/views/manage-users/edit-user-email.html @@ -19,7 +19,7 @@

    This will change the email address for {{ user.name }}.

    {% call form_wrapper() %} - {{ form.email_address(param_extensions={"classes": "govuk-!-width-full"}, error_message_with_html=True) }} + {{ form.email_address(param_extensions={"classes": ""}, error_message_with_html=True) }} {{ page_footer('Save') }} {% endcall %} diff --git a/app/templates/views/organizations/organization/settings/edit-organization-billing-details.html b/app/templates/views/organizations/organization/settings/edit-organization-billing-details.html index fbfa2e0ca..0bf799371 100644 --- a/app/templates/views/organizations/organization/settings/edit-organization-billing-details.html +++ b/app/templates/views/organizations/organization/settings/edit-organization-billing-details.html @@ -18,11 +18,11 @@ {{ page_header('Edit organization billing details') }} {% call form_wrapper() %} - {{ form.billing_contact_names(param_extensions={"classes": "govuk-!-width-full"}) }} - {{ form.billing_contact_email_addresses(param_extensions={"classes": "govuk-!-width-full"}) }} + {{ form.billing_contact_names(param_extensions={"classes": ""}) }} + {{ form.billing_contact_email_addresses(param_extensions={"classes": ""}) }}
    - {{ form.billing_reference(param_extensions={"classes": "govuk-!-width-full"}) }} - {{ form.purchase_order_number(param_extensions={"classes": "govuk-!-width-full"}) }} + {{ form.billing_reference(param_extensions={"classes": ""}) }} + {{ form.purchase_order_number(param_extensions={"classes": ""}) }}
    {{ textbox( form.notes, diff --git a/app/templates/views/organizations/organization/users/invite-org-user.html b/app/templates/views/organizations/organization/users/invite-org-user.html index cab60bb7c..18030eb95 100644 --- a/app/templates/views/organizations/organization/users/invite-org-user.html +++ b/app/templates/views/organizations/organization/users/invite-org-user.html @@ -19,7 +19,7 @@ {% call form_wrapper() %} {{ form.email_address( param_extensions={ - "classes": "govuk-!-width-full" + "classes": "" }, error_message_with_html=True ) }} diff --git a/app/templates/views/platform-admin/index.html b/app/templates/views/platform-admin/index.html index be5fbd6f4..1aba84087 100644 --- a/app/templates/views/platform-admin/index.html +++ b/app/templates/views/platform-admin/index.html @@ -20,7 +20,7 @@ {{ form.start_date(param_extensions={"hint": {"text":"Enter start date in format YYYY-MM-DD"}}) }} {{ form.end_date(param_extensions={"hint": {"text":"Enter end date in format YYYY-MM-DD"}}) }}
    - {{ govukButton({ "text": "Filter" }) }} + {{ govukButton({ "text": "Filter", "classes": "margin-y-2" }) }} {% endcall %} {% endset %} diff --git a/app/templates/views/platform-admin/services.html b/app/templates/views/platform-admin/services.html index adaf5be33..e67e4b898 100644 --- a/app/templates/views/platform-admin/services.html +++ b/app/templates/views/platform-admin/services.html @@ -67,7 +67,7 @@ {{ form.start_date(param_extensions={"hint": {"text": "Enter start date in format YYYY-MM-DD"}}) }} {{ form.end_date(param_extensions={"hint": {"text": "Enter end date in format YYYY-MM-DD"}}) }} {{ form.include_from_test_key }} - {{ govukButton({ "text": "Filter" }) }} + {{ govukButton({ "text": "Filter", "classes": "margin-y-2" }) }} {% endcall %} {% endset %} diff --git a/app/templates/views/send-test.html b/app/templates/views/send-test.html index 7fd0a61e0..109c11405 100644 --- a/app/templates/views/send-test.html +++ b/app/templates/views/send-test.html @@ -25,7 +25,7 @@ ) %}
    - {{ form.placeholder_value(param_extensions={"classes": "govuk-!-width-full"}) }} + {{ form.placeholder_value(param_extensions={"classes": ""}) }}
    {% if skip_link or link_to_upload %}
    diff --git a/app/templates/views/service-settings/edit-service-billing-details.html b/app/templates/views/service-settings/edit-service-billing-details.html index 63832b918..e334a0b73 100644 --- a/app/templates/views/service-settings/edit-service-billing-details.html +++ b/app/templates/views/service-settings/edit-service-billing-details.html @@ -20,11 +20,11 @@ {{ page_header('Change billing details') }} {% call form_wrapper() %} - {{ form.billing_contact_names(param_extensions={"classes": "govuk-!-width-full"}) }} - {{ form.billing_contact_email_addresses(param_extensions={"classes": "govuk-!-width-full"}) }} + {{ form.billing_contact_names(param_extensions={"classes": ""}) }} + {{ form.billing_contact_email_addresses(param_extensions={"classes": ""}) }}
    - {{ form.billing_reference(param_extensions={"classes": "govuk-!-width-full"}) }} - {{ form.purchase_order_number(param_extensions={"classes": "govuk-!-width-full"}) }} + {{ form.billing_reference(param_extensions={"classes": ""}) }} + {{ form.purchase_order_number(param_extensions={"classes": ""}) }}
    {{ textbox( form.notes, diff --git a/app/templates/views/service-settings/email-reply-to/_verify-updates.html b/app/templates/views/service-settings/email-reply-to/_verify-updates.html index 88b117b9c..8cc3b8680 100644 --- a/app/templates/views/service-settings/email-reply-to/_verify-updates.html +++ b/app/templates/views/service-settings/email-reply-to/_verify-updates.html @@ -49,7 +49,7 @@ {{ form.email_address( param_extensions={ "hint": {"text": "This should be a shared inbox managed by your team, not your own email address"}, - "classes": "govuk-!-width-full" + "classes": "" }, error_message_with_html=True ) }} diff --git a/app/templates/views/service-settings/email-reply-to/add.html b/app/templates/views/service-settings/email-reply-to/add.html index dd04278f4..c4b68e12c 100644 --- a/app/templates/views/service-settings/email-reply-to/add.html +++ b/app/templates/views/service-settings/email-reply-to/add.html @@ -20,7 +20,7 @@ {{ form.email_address( param_extensions={ "hint": {"text": "This should be a shared inbox managed by your team, not your own email address"}, - "classes": "govuk-!-width-full" + "classes": "" }, error_message_with_html=True ) }} diff --git a/app/templates/views/service-settings/email-reply-to/edit.html b/app/templates/views/service-settings/email-reply-to/edit.html index 3037f9598..595029674 100644 --- a/app/templates/views/service-settings/email-reply-to/edit.html +++ b/app/templates/views/service-settings/email-reply-to/edit.html @@ -19,7 +19,7 @@ {{ form.email_address( param_extensions={ "hint": {"text": "This should be a shared inbox managed by your team, not your own email address"}, - "classes": "govuk-!-width-full" + "classes": "" }, error_message_with_html=True ) }} diff --git a/app/templates/views/service-settings/send-files-by-email.html b/app/templates/views/service-settings/send-files-by-email.html index c2f06ff13..3df54b534 100644 --- a/app/templates/views/service-settings/send-files-by-email.html +++ b/app/templates/views/service-settings/send-files-by-email.html @@ -36,7 +36,7 @@ {{ radio(option, data_target=data_target) }}
    - {{ form|attr(option.data)(param_extensions={"classes": "govuk-!-width-full", "label": {"text": " "}}) }} + {{ form|attr(option.data)(param_extensions={"classes": "", "label": {"text": " "}}) }}
    {% endfor %} {% endcall %} diff --git a/app/templates/views/support/form.html b/app/templates/views/support/form.html index cc047db0a..8eaa80184 100644 --- a/app/templates/views/support/form.html +++ b/app/templates/views/support/form.html @@ -29,8 +29,8 @@ {% call form_wrapper() %} {{ textbox(form.feedback, width='1-1', hint='', rows=10, autosize=True) }} {% if not current_user.is_authenticated %} - {{ form.name(param_extensions={"classes": "govuk-!-width-full"}) }} - {{ form.email_address(param_extensions={"classes": "govuk-!-width-full"}) }} + {{ form.name(param_extensions={"classes": ""}) }} + {{ form.email_address(param_extensions={"classes": ""}) }} {% else %}

    We’ll reply to {{ current_user.email_address }}

    {% endif %} diff --git a/app/templates/views/templates/_move_to.html b/app/templates/views/templates/_move_to.html index 36120163e..d75cbf830 100644 --- a/app/templates/views/templates/_move_to.html +++ b/app/templates/views/templates/_move_to.html @@ -15,14 +15,14 @@
    - {{ templates_and_folders_form.move_to_new_folder_name(param_extensions={"classes": "govuk-!-width-full"}) }} + {{ templates_and_folders_form.move_to_new_folder_name(param_extensions={"classes": ""}) }} {{ page_footer('Add to new folder', button_name='operation', button_value='move-to-new-folder') }}
    {% endif %}
    - {{ templates_and_folders_form.add_new_folder_name(param_extensions={"classes": "govuk-!-width-full"}) }} + {{ templates_and_folders_form.add_new_folder_name(param_extensions={"classes": ""}) }} {{ page_footer('Add new folder', button_name='operation', button_value='add-new-folder') }}
    diff --git a/app/templates/views/templates/manage-template-folder.html b/app/templates/views/templates/manage-template-folder.html index d9a7ef6f7..b25fc458e 100644 --- a/app/templates/views/templates/manage-template-folder.html +++ b/app/templates/views/templates/manage-template-folder.html @@ -23,7 +23,7 @@ {% call form_wrapper(action=url_for('main.manage_template_folder', service_id=current_service.id, template_folder_id=template_folder_id)) %} {{ form.name(param_extensions={ - "classes": "govuk-!-width-full" + "classes": "" }) }} {% if current_user.has_permissions("manage_service") and form.users_with_permission.all_service_users %} {{ form.users_with_permission }} diff --git a/tests/app/main/views/organizations/test_organizations.py b/tests/app/main/views/organizations/test_organizations.py index f4ac2944f..57fc14cfd 100644 --- a/tests/app/main/views/organizations/test_organizations.py +++ b/tests/app/main/views/organizations/test_organizations.py @@ -747,7 +747,7 @@ def test_manage_org_users_should_show_live_search_if_more_than_7_users( assert 'data-module' not in textbox assert not page.select_one('[data-force-focus]') assert textbox['class'] == [ - 'usa-input', 'govuk-!-width-full', + 'usa-input' ] assert normalize_spaces( page.select_one('label[for=search]').text @@ -1416,7 +1416,7 @@ def test_view_edit_organization_billing_details( ] for label in labels: assert label.text.strip() in labels_list - textbox_names = page.find_all('input', class_='govuk-input govuk-!-width-full') + textbox_names = page.find_all('input', class_='govuk-input ') names_list = [ 'billing_contact_email_addresses', 'billing_contact_names', diff --git a/tests/app/main/views/service_settings/test_service_settings.py b/tests/app/main/views/service_settings/test_service_settings.py index e1e4ed2c7..a9444bf89 100644 --- a/tests/app/main/views/service_settings/test_service_settings.py +++ b/tests/app/main/views/service_settings/test_service_settings.py @@ -4114,7 +4114,7 @@ def test_view_edit_service_billing_details( ] for label in labels: assert label.text.strip() in labels_list - textbox_names = page.find_all('input', class_='govuk-input govuk-!-width-full') + textbox_names = page.find_all('input', class_='govuk-input ') names_list = [ 'billing_contact_email_addresses', 'billing_contact_names', diff --git a/tests/app/main/views/test_email_branding.py b/tests/app/main/views/test_email_branding.py index 2af1985d5..28191ea18 100644 --- a/tests/app/main/views/test_email_branding.py +++ b/tests/app/main/views/test_email_branding.py @@ -26,7 +26,7 @@ def test_email_branding_page_shows_full_branding_list( page.select_one('h1').text ) == "Email branding" - assert page.select('.grid-col-10 a')[-1]['href'] == url_for('main.create_email_branding') + assert page.select('.grid-col-9 a')[-1]['href'] == url_for('main.create_email_branding') assert brand_names == [ 'org 1', diff --git a/tests/app/main/views/test_find_users.py b/tests/app/main/views/test_find_users.py index 566e01644..b970c9d03 100644 --- a/tests/app/main/views/test_find_users.py +++ b/tests/app/main/views/test_find_users.py @@ -36,10 +36,10 @@ def test_find_users_by_email_displays_users_found( assert any(element.text.strip() == 'test@gsa.gov' for element in document.find_all( 'a', {'class': 'browse-list-link'}, href=True) ) - assert any(element.text.strip() == 'Test User' for element in document.find_all('p', {'class': 'browse-list-hint'})) + assert any(element.text.strip() == 'Test User' for element in document.find_all('span', {'class': 'browse-list-hint'})) assert document.find('a', {'class': 'browse-list-link'}).text.strip() == 'test@gsa.gov' - assert document.find('p', {'class': 'browse-list-hint'}).text.strip() == 'Test User' + assert document.find('span', {'class': 'browse-list-hint'}).text.strip() == 'Test User' def test_find_users_by_email_displays_multiple_users( @@ -56,10 +56,10 @@ def test_find_users_by_email_displays_multiple_users( document = client_request.post('main.find_users_by_email', _data={"search": "apple"}, _expected_status=200) assert any( - element.text.strip() == 'Apple Jack' for element in document.find_all('p', {'class': 'browse-list-hint'}) + element.text.strip() == 'Apple Jack' for element in document.find_all('span', {'class': 'browse-list-hint'}) ) assert any( - element.text.strip() == 'Apple Bloom' for element in document.find_all('p', {'class': 'browse-list-hint'}) + element.text.strip() == 'Apple Bloom' for element in document.find_all('span', {'class': 'browse-list-hint'}) ) @@ -74,7 +74,7 @@ def test_find_users_by_email_displays_message_if_no_users_found( 'main.find_users_by_email', _data={"search": "twilight.sparkle"}, _expected_status=200 ) - assert document.find('p', {'class': 'browse-list-hint'}).text.strip() == 'No users found.' + assert document.find('span', {'class': 'browse-list-hint'}).text.strip() == 'No users found.' def test_find_users_by_email_validates_against_empty_search_submission( diff --git a/tests/app/main/views/test_manage_users.py b/tests/app/main/views/test_manage_users.py index efc154438..355328ae1 100644 --- a/tests/app/main/views/test_manage_users.py +++ b/tests/app/main/views/test_manage_users.py @@ -233,7 +233,7 @@ def test_should_show_live_search_if_more_than_7_users( assert 'data-module' not in textbox assert not page.select_one('[data-force-focus]') assert textbox['class'] == [ - 'usa-input', 'govuk-!-width-full', + 'usa-input', ] assert normalize_spaces( page.select_one('label[for=search]').text diff --git a/tests/app/main/views/test_tour.py b/tests/app/main/views/test_tour.py index 631b4943d..1bc9f5d7f 100644 --- a/tests/app/main/views/test_tour.py +++ b/tests/app/main/views/test_tour.py @@ -184,7 +184,7 @@ def test_should_show_empty_text_box( assert 'value' not in textbox assert textbox['name'] == 'placeholder_value' assert textbox['class'] == [ - 'usa-input', 'govuk-!-width-full', + 'usa-input', ] # data-module=autofocus is set on a containing element so it # shouldn’t also be set on the textbox itself diff --git a/tests/javascripts/listEntry.test.js b/tests/javascripts/listEntry.test.js index 40c44e883..78bda9718 100644 --- a/tests/javascripts/listEntry.test.js +++ b/tests/javascripts/listEntry.test.js @@ -53,7 +53,7 @@ describe("List entry", () => { - +
    `; } diff --git a/tests/javascripts/templateFolderForm.test.js b/tests/javascripts/templateFolderForm.test.js index 28af7865f..2a10912db 100644 --- a/tests/javascripts/templateFolderForm.test.js +++ b/tests/javascripts/templateFolderForm.test.js @@ -56,7 +56,7 @@ function setFixtures (hierarchy, newTemplateDataModules = "") { - +
    {{table_headings.field_headings[0]}}