mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 10:03:21 -04:00
Merge pull request #1499 from gov-cjwaszczuk/master
Add a non-GOV.UK banner option for email branding
This commit is contained in:
@@ -511,7 +511,8 @@ class ServiceBrandingOrg(Form):
|
|||||||
choices=[
|
choices=[
|
||||||
('govuk', 'GOV.UK only'),
|
('govuk', 'GOV.UK only'),
|
||||||
('both', 'GOV.UK and organisation'),
|
('both', 'GOV.UK and organisation'),
|
||||||
('org', 'Organisation only')
|
('org', 'Organisation only'),
|
||||||
|
('org_banner', 'Organisation banner')
|
||||||
],
|
],
|
||||||
validators=[
|
validators=[
|
||||||
DataRequired()
|
DataRequired()
|
||||||
|
|||||||
@@ -187,6 +187,8 @@
|
|||||||
GOV.UK and {{ organisation.name if organisation else None }}
|
GOV.UK and {{ organisation.name if organisation else None }}
|
||||||
{% elif current_service.branding == 'org' %}
|
{% elif current_service.branding == 'org' %}
|
||||||
Only {{ organisation.name if organisation else None }}
|
Only {{ organisation.name if organisation else None }}
|
||||||
|
{% elif current_service.branding == 'org_banner' %}
|
||||||
|
Only {{ organisation.name if organisation else None }} banner
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{{ edit_field('Change', url_for('.service_set_branding_and_org', service_id=current_service.id)) }}
|
{{ edit_field('Change', url_for('.service_set_branding_and_org', service_id=current_service.id)) }}
|
||||||
|
|||||||
@@ -922,10 +922,12 @@ def test_should_show_branding(
|
|||||||
assert page.find('input', attrs={"id": "branding_type-0"})['value'] == 'govuk'
|
assert page.find('input', attrs={"id": "branding_type-0"})['value'] == 'govuk'
|
||||||
assert page.find('input', attrs={"id": "branding_type-1"})['value'] == 'both'
|
assert page.find('input', attrs={"id": "branding_type-1"})['value'] == 'both'
|
||||||
assert page.find('input', attrs={"id": "branding_type-2"})['value'] == 'org'
|
assert page.find('input', attrs={"id": "branding_type-2"})['value'] == 'org'
|
||||||
|
assert page.find('input', attrs={"id": "branding_type-3"})['value'] == 'org_banner'
|
||||||
|
|
||||||
assert 'checked' in page.find('input', attrs={"id": "branding_type-0"}).attrs
|
assert 'checked' in page.find('input', attrs={"id": "branding_type-0"}).attrs
|
||||||
assert 'checked' not in page.find('input', attrs={"id": "branding_type-1"}).attrs
|
assert 'checked' not in page.find('input', attrs={"id": "branding_type-1"}).attrs
|
||||||
assert 'checked' not in page.find('input', attrs={"id": "branding_type-2"}).attrs
|
assert 'checked' not in page.find('input', attrs={"id": "branding_type-2"}).attrs
|
||||||
|
assert 'checked' not in page.find('input', attrs={"id": "branding_type-3"}).attrs
|
||||||
|
|
||||||
app.organisations_client.get_organisations.assert_called_once_with()
|
app.organisations_client.get_organisations.assert_called_once_with()
|
||||||
app.service_api_client.get_service.assert_called_once_with(service_one['id'])
|
app.service_api_client.get_service.assert_called_once_with(service_one['id'])
|
||||||
@@ -945,10 +947,12 @@ def test_should_show_organisations(
|
|||||||
assert page.find('input', attrs={"id": "branding_type-0"})['value'] == 'govuk'
|
assert page.find('input', attrs={"id": "branding_type-0"})['value'] == 'govuk'
|
||||||
assert page.find('input', attrs={"id": "branding_type-1"})['value'] == 'both'
|
assert page.find('input', attrs={"id": "branding_type-1"})['value'] == 'both'
|
||||||
assert page.find('input', attrs={"id": "branding_type-2"})['value'] == 'org'
|
assert page.find('input', attrs={"id": "branding_type-2"})['value'] == 'org'
|
||||||
|
assert page.find('input', attrs={"id": "branding_type-3"})['value'] == 'org_banner'
|
||||||
|
|
||||||
assert 'checked' in page.find('input', attrs={"id": "branding_type-0"}).attrs
|
assert 'checked' in page.find('input', attrs={"id": "branding_type-0"}).attrs
|
||||||
assert 'checked' not in page.find('input', attrs={"id": "branding_type-1"}).attrs
|
assert 'checked' not in page.find('input', attrs={"id": "branding_type-1"}).attrs
|
||||||
assert 'checked' not in page.find('input', attrs={"id": "branding_type-2"}).attrs
|
assert 'checked' not in page.find('input', attrs={"id": "branding_type-2"}).attrs
|
||||||
|
assert 'checked' not in page.find('input', attrs={"id": "branding_type-3"}).attrs
|
||||||
|
|
||||||
app.organisations_client.get_organisations.assert_called_once_with()
|
app.organisations_client.get_organisations.assert_called_once_with()
|
||||||
app.service_api_client.get_service.assert_called_once_with(service_one['id'])
|
app.service_api_client.get_service.assert_called_once_with(service_one['id'])
|
||||||
|
|||||||
Reference in New Issue
Block a user