mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Updating for US English
Words found: personalis* customis* organis* colour behaviour
This commit is contained in:
@@ -169,8 +169,8 @@ def test_create_new_organisation_validates(
|
||||
for error in page.select('.govuk-error-message')
|
||||
] == [
|
||||
('name', 'Error: Cannot be empty'),
|
||||
('organisation_type', 'Error: Select the type of organisation'),
|
||||
('crown_status', 'Error: Select whether this organisation is a crown body'),
|
||||
('organisation_type', 'Error: Select the type of organization'),
|
||||
('crown_status', 'Error: Select whether this organization is a crown body'),
|
||||
]
|
||||
assert mock_create_organisation.called is False
|
||||
|
||||
@@ -178,7 +178,7 @@ def test_create_new_organisation_validates(
|
||||
@pytest.mark.parametrize('name, error_message', [
|
||||
('', 'Cannot be empty'),
|
||||
('a', 'at least two alphanumeric characters'),
|
||||
('a' * 256, 'Organisation name must be 255 characters or fewer'),
|
||||
('a' * 256, 'Organization name must be 255 characters or fewer'),
|
||||
])
|
||||
def test_create_new_organisation_fails_with_incorrect_input(
|
||||
client_request,
|
||||
@@ -1318,7 +1318,7 @@ def test_update_organisation_name(
|
||||
@pytest.mark.parametrize('name, error_message', [
|
||||
('', 'Cannot be empty'),
|
||||
('a', 'at least two alphanumeric characters'),
|
||||
('a' * 256, 'Organisation name must be 255 characters or fewer'),
|
||||
('a' * 256, 'Organization name must be 255 characters or fewer'),
|
||||
])
|
||||
def test_update_organisation_with_incorrect_input(
|
||||
client_request,
|
||||
@@ -1352,7 +1352,7 @@ def test_update_organisation_with_non_unique_name(
|
||||
status_code=400,
|
||||
json={'result': 'error', 'message': 'Organisation name already exists'}
|
||||
),
|
||||
message='Organisation name already exists',
|
||||
message='Organization name already exists',
|
||||
)
|
||||
)
|
||||
client_request.login(platform_admin_user)
|
||||
@@ -1363,7 +1363,7 @@ def test_update_organisation_with_non_unique_name(
|
||||
_expected_status=200,
|
||||
)
|
||||
|
||||
assert 'This organisation name is already in use' in page.select_one('.govuk-error-message').text
|
||||
assert 'This organization name is already in use' in page.select_one('.govuk-error-message').text
|
||||
|
||||
|
||||
def test_get_edit_organisation_go_live_notes_page(
|
||||
@@ -1436,7 +1436,7 @@ def test_view_edit_organisation_notes(
|
||||
'main.edit_organisation_notes',
|
||||
org_id=organisation_one['id'],
|
||||
)
|
||||
assert page.select_one('h1').text == "Edit organisation notes"
|
||||
assert page.select_one('h1').text == "Edit organization notes"
|
||||
assert page.find('label', class_="form-label").text.strip() == "Notes"
|
||||
assert page.find('textarea').attrs["name"] == "notes"
|
||||
|
||||
@@ -1531,7 +1531,7 @@ def test_view_edit_organisation_billing_details(
|
||||
'main.edit_organisation_billing_details',
|
||||
org_id=organisation_one['id'],
|
||||
)
|
||||
assert page.select_one('h1').text == "Edit organisation billing details"
|
||||
assert page.select_one('h1').text == "Edit organization billing details"
|
||||
labels = page.find_all('label', class_="form-label")
|
||||
labels_list = [
|
||||
'Contact email addresses',
|
||||
|
||||
@@ -142,7 +142,7 @@ def test_should_add_service_and_redirect_to_tour_when_no_services(
|
||||
'sms',
|
||||
(
|
||||
"Hi, I’m trying out U.S. Notify. Today is "
|
||||
"((day of week)) and my favourite colour is ((colour))."
|
||||
"((day of week)) and my favourite color is ((color))."
|
||||
),
|
||||
101,
|
||||
)
|
||||
|
||||
@@ -2926,7 +2926,7 @@ def test_choose_from_contact_list_with_personalised_template(
|
||||
normalize_spaces(p.text) for p in page.select('main p')
|
||||
] == [
|
||||
'You cannot use an emergency contact list with this template because '
|
||||
'it is personalised with ((name)) and ((thing)).',
|
||||
'it is personalized with ((name)) and ((thing)).',
|
||||
'Emergency contact lists can only include email addresses or phone numbers.',
|
||||
]
|
||||
assert not page.select('table')
|
||||
|
||||
@@ -1248,11 +1248,11 @@ def test_should_403_when_create_template_with_process_type_of_priority_for_non_p
|
||||
|
||||
@pytest.mark.parametrize('old_content, new_content, expected_paragraphs', [
|
||||
(
|
||||
"my favourite colour is blue",
|
||||
"my favourite colour is ((colour))",
|
||||
"my favourite color is blue",
|
||||
"my favourite color is ((color))",
|
||||
[
|
||||
'You added ((colour))',
|
||||
'Before you send any messages, make sure your API calls include colour.',
|
||||
'You added ((color))',
|
||||
'Before you send any messages, make sure your API calls include color.',
|
||||
]
|
||||
),
|
||||
(
|
||||
@@ -1833,7 +1833,7 @@ def test_should_show_message_before_redacting_template(
|
||||
)
|
||||
|
||||
assert (
|
||||
'Are you sure you want to hide personalisation after sending?'
|
||||
'Are you sure you want to hide personalization after sending?'
|
||||
) in page.select('.banner-dangerous')[0].text
|
||||
|
||||
form = page.select('.banner-dangerous form')[0]
|
||||
@@ -1859,7 +1859,7 @@ def test_should_show_redact_template(
|
||||
)
|
||||
|
||||
assert normalize_spaces(page.select('.banner-default-with-tick')[0].text) == (
|
||||
'Personalised content will be hidden for messages sent with this template'
|
||||
'Personalized content will be hidden for messages sent with this template'
|
||||
)
|
||||
|
||||
mock_redact_template.assert_called_once_with(SERVICE_ONE_ID, fake_uuid)
|
||||
@@ -1882,7 +1882,7 @@ def test_should_show_hint_once_template_redacted(
|
||||
_test_page_title=False,
|
||||
)
|
||||
|
||||
assert page.select('.hint')[0].text == 'Personalisation is hidden after sending'
|
||||
assert page.select('.hint')[0].text == 'Personalization is hidden after sending'
|
||||
|
||||
|
||||
def test_set_template_sender(
|
||||
@@ -1993,13 +1993,13 @@ def test_set_template_sender(
|
||||
),
|
||||
(
|
||||
'sms', False, 'Hello ((name))',
|
||||
'Will be charged as 1 text message (not including personalisation)',
|
||||
'Will be charged as 1 text message (not including personalization)',
|
||||
None,
|
||||
),
|
||||
(
|
||||
# Length of placeholder body doesn’t count towards fragment count
|
||||
'sms', False, f'Hello (( {"a" * 999} ))',
|
||||
'Will be charged as 1 text message (not including personalisation)',
|
||||
'Will be charged as 1 text message (not including personalization)',
|
||||
None,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user