updates to correct test failures

This commit is contained in:
stvnrlly
2023-01-05 14:35:37 -05:00
parent fdf6aca612
commit b00fea05bc
11 changed files with 23 additions and 23 deletions

View File

@@ -980,7 +980,7 @@ class OrganisationTypeField(GovukRadiosField):
(value, label) for value, label in Organisation.TYPE_LABELS.items()
if not include_only or value in include_only
],
thing='the type of organisation',
thing='the type of organization',
validators=validators or [],
**kwargs
)
@@ -1154,7 +1154,7 @@ class OrganisationCrownStatusForm(StripWhitespaceForm):
('non-crown', 'No'),
('unknown', 'Not sure'),
],
thing='whether this organisation is a crown body',
thing='whether this organization is a crown body',
)
@@ -1166,7 +1166,7 @@ class OrganisationAgreementSignedForm(StripWhitespaceForm):
('no', 'No'),
('unknown', 'No (but we have some service-specific agreements in place)'),
],
thing='whether this organisation has signed the agreement',
thing='whether this organization has signed the agreement',
param_extensions={
'items': [
{'hint': {'html': 'Users will be told their organization has already signed the agreement'}},

View File

@@ -597,7 +597,7 @@ def _get_content_count_error_and_message_for_template(template):
if template.placeholders:
return False, (
f'Will be charged as {message_count(template.fragment_count, template.template_type)} '
f'(not including personalisation)'
f'(not including personalization)'
)
return False, (
f'Will be charged as {message_count(template.fragment_count, template.template_type)} '

View File

@@ -19,7 +19,7 @@
<div class="govuk-grid-column-five-sixths">
<p class="govuk-body">
If a users email addresses ends with one of these domains then
any services they create will be associated with this organisation.
any services they create will be associated with this organization.
</p>
{% call form_wrapper() %}
{{ list_entry(

View File

@@ -19,7 +19,7 @@
<div class="govuk-grid-column-five-sixths">
<p class="govuk-body">
Text entered here will be displayed in the Zendesk ticket when a service
belonging to this organisation requests to go live.
belonging to this organization requests to go live.
</p>
{% call form_wrapper() %}
{{ textbox(form.request_to_go_live_notes, width='1-1', rows=3, autosize=True) }}

View File

@@ -6,7 +6,7 @@
{% from "components/uk_components/back-link/macro.njk" import govukBackLink %}
{% block org_page_title %}
Edit organisation billing details
Edit organization billing details
{% endblock %}
{% block backLink %}
@@ -15,7 +15,7 @@
{% block maincolumn_content %}
{{ page_header('Edit organisation billing details') }}
{{ page_header('Edit organization billing details') }}
{% call form_wrapper() %}
{{ form.billing_contact_names(param_extensions={"classes": "govuk-!-width-full"}) }}

View File

@@ -6,7 +6,7 @@
{% from "components/uk_components/back-link/macro.njk" import govukBackLink %}
{% block org_page_title %}
Edit organisation notes
Edit organization notes
{% endblock %}
{% block backLink %}
@@ -15,7 +15,7 @@
{% block maincolumn_content %}
{{ page_header('Edit organisation notes') }}
{{ page_header('Edit organization notes') }}
{% call form_wrapper() %}
{{ textbox(
form.notes,

View File

@@ -72,7 +72,7 @@
{% endif %}
{% if not template._template.redact_personalisation %}
<span class="page-footer-link page-footer-delete-link-without-button">
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.confirm_redact_template', service_id=current_service.id, template_id=template.id) }}">Hide personalisation after sending</a>
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.confirm_redact_template', service_id=current_service.id, template_id=template.id) }}">Hide personalization after sending</a>
</span>
{% else %}
<p class="hint">Personalization is hidden after sending</p>

View File

@@ -63,7 +63,7 @@ def test_organisation_page_shows_all_organisations(
assert normalize_spaces(
page.select_one('a.govuk-button--secondary').text
) == 'New organisation'
) == 'New organization'
get_organisations.assert_called_once_with()
@@ -211,7 +211,7 @@ def test_create_new_organisation_fails_with_duplicate_name(
mocker,
):
def _create(**_kwargs):
json_mock = mocker.Mock(return_value={'message': 'Organisation name already exists'})
json_mock = mocker.Mock(return_value={'message': 'Organization name already exists'})
resp_mock = mocker.Mock(status_code=400, json=json_mock)
http_error = HTTPError(response=resp_mock, message="Default message")
raise http_error
@@ -232,7 +232,7 @@ def test_create_new_organisation_fails_with_duplicate_name(
_expected_status=200,
)
error_message = 'This organisation name is already in use'
error_message = 'This organization name is already in use'
assert error_message in page.select_one('.govuk-error-message').text
@@ -972,7 +972,7 @@ def test_organisation_settings_for_platform_admin(
{
'value': 'yes',
'label': 'Yes',
'hint': 'Users will be told their organisation has already signed the agreement'
'hint': 'Users will be told their organization has already signed the agreement'
},
{
'value': 'no',

View File

@@ -94,7 +94,7 @@ def mock_get_service_settings_page_common(
'Count in list of live services Yes Change if service is counted in list of live services',
'Billing details None Change billing details for service',
'Notes None Change the notes for the service',
'Organisation Test organisation Federal government Change organisation for service',
'Organization Test organisation Federal government Change organisation for service',
'Rate limit 3,000 per minute Change rate limit',
'Message limit 1,000 per day Change daily message limit',
'Free text message allowance 250,000 per year Change free text message allowance',
@@ -151,9 +151,9 @@ def test_no_go_live_link_for_service_without_organisation(
assert page.find('h1').text == 'Settings'
is_live = find_element_by_tag_and_partial_text(page, tag='td', string='Live')
assert normalize_spaces(is_live.find_next_sibling().text) == 'No (organisation must be set first)'
assert normalize_spaces(is_live.find_next_sibling().text) == 'No (organization must be set first)'
organisation = find_element_by_tag_and_partial_text(page, tag='td', string='Organisation')
organisation = find_element_by_tag_and_partial_text(page, tag='td', string='Organization')
assert normalize_spaces(organisation.find_next_siblings()[0].text) == 'Not set Federal government'
assert normalize_spaces(organisation.find_next_siblings()[1].text) == 'Change organisation for service'
@@ -177,7 +177,7 @@ def test_organisation_name_links_to_org_dashboard(
'main.service_settings', service_id=SERVICE_ONE_ID
)
org_row = find_element_by_tag_and_partial_text(response, tag='tr', string='Organisation')
org_row = find_element_by_tag_and_partial_text(response, tag='tr', string='Organization')
assert org_row.find('a')['href'] == url_for('main.organisation_dashboard', org_id=ORGANISATION_ID)
assert normalize_spaces(org_row.find('a').text) == 'Test organisation'
@@ -3807,7 +3807,7 @@ def test_select_organisation_shows_message_if_no_orgs(
service_id=service_one['id'],
)
assert normalize_spaces(page.select_one('main p').text) == "No organisations"
assert normalize_spaces(page.select_one('main p').text) == "No organizations"
assert not page.select_one('main button')

View File

@@ -84,7 +84,7 @@ def test_show_different_page_if_user_org_type_is_local(
@pytest.mark.parametrize('email_address', (
# Users email address doesnt matter when the organisation is known
# Users email address doesnt matter when the organization is known
'test@example.gsa.gov',
'test@anotherexample.gsa.gov',
))
@@ -171,7 +171,7 @@ def test_add_service_has_to_choose_org_type(
_expected_status=200,
)
assert normalize_spaces(page.select_one('.govuk-error-message').text) == (
'Error: Select the type of organisation'
'Error: Select the type of organization'
)
assert mock_create_service.called is False
assert mock_create_service_template.called is False

View File

@@ -1398,7 +1398,7 @@ def test_link_to_upload_not_offered_when_entering_personalisation(
step_index=1,
)
# Were entering personalisation
# Were entering personalization
assert page.select_one('input[type=text]')['name'] == 'placeholder_value'
assert page.select_one('label[for=placeholder_value]').text.strip() == 'name'
# No Upload link shown