mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Convert SearchFields to GovukSearchFields
Changes those fields in the following forms: - SearchByNameForm - SearchUsersByEmailForm - SearchUsersForm - SearchNotificationsForm Includes changes to templates that use this form and associated tests.
This commit is contained in:
@@ -363,7 +363,7 @@ def test_shows_message_when_no_notifications(
|
||||
{},
|
||||
{},
|
||||
'Search by recipient',
|
||||
'',
|
||||
None,
|
||||
),
|
||||
(
|
||||
{
|
||||
@@ -371,7 +371,7 @@ def test_shows_message_when_no_notifications(
|
||||
},
|
||||
{},
|
||||
'Search by phone number',
|
||||
'',
|
||||
None,
|
||||
),
|
||||
(
|
||||
{
|
||||
@@ -441,7 +441,7 @@ def test_search_recipient_form(
|
||||
assert(len(recipient_inputs) == 2)
|
||||
|
||||
for field in recipient_inputs:
|
||||
assert field['value'] == expected_search_box_contents
|
||||
assert field.get("value") == expected_search_box_contents
|
||||
|
||||
|
||||
@pytest.mark.parametrize('message_type, expected_search_box_label', [
|
||||
|
||||
@@ -69,5 +69,5 @@ def test_find_services_by_name_validates_against_empty_search_submission(
|
||||
client_request.login(platform_admin_user)
|
||||
document = client_request.post('main.find_services_by_name', _data={"search": ""}, _expected_status=200)
|
||||
|
||||
expected_message = "You need to enter full or partial name to search by."
|
||||
assert document.find('span', {'class': 'error-message'}).text.strip() == expected_message
|
||||
expected_message = "Error: You need to enter full or partial name to search by."
|
||||
assert document.find('span', {'class': 'govuk-error-message'}).text.strip() == expected_message
|
||||
|
||||
@@ -87,8 +87,8 @@ def test_find_users_by_email_validates_against_empty_search_submission(
|
||||
client_request.login(platform_admin_user)
|
||||
document = client_request.post('main.find_users_by_email', _data={"search": ""}, _expected_status=200)
|
||||
|
||||
expected_message = "You need to enter full or partial email address to search by."
|
||||
assert document.find('span', {'class': 'error-message'}).text.strip() == expected_message
|
||||
expected_message = "Error: You need to enter full or partial email address to search by."
|
||||
assert document.find('span', {'class': 'govuk-error-message'}).text.strip() == expected_message
|
||||
|
||||
|
||||
def test_user_information_page_shows_information_about_user(
|
||||
|
||||
Reference in New Issue
Block a user