Make pricing page consistent in talking about MoU

We shouldn’t tell people on one page (the terms page) that we know about
their organisations agreement and then on the pricing page tell them to
contact us to find out what we know about the agreement.

So this commit adds the same logic from the terms page to the pricing
page, with wording that makes sense in the pricing context.
This commit is contained in:
Chris Hill-Scott
2018-03-16 11:03:30 +00:00
parent b2c199e609
commit c2bc7eca2c
3 changed files with 34 additions and 8 deletions

View File

@@ -52,6 +52,7 @@ def pricing():
for cc, country in INTERNATIONAL_BILLING_RATES.items() for cc, country in INTERNATIONAL_BILLING_RATES.items()
], key=lambda x: x[0]), ], key=lambda x: x[0]),
search_form=SearchTemplatesForm(), search_form=SearchTemplatesForm(),
agreement_info=AgreementInfo.from_current_user(),
) )

View File

@@ -124,8 +124,18 @@
<h2 class="heading-medium" id="paying">How to pay</h2> <h2 class="heading-medium" id="paying">How to pay</h2>
<p>You can find details of how to pay for Notify in our data sharing and financial agreement.</p> <p>You can find details of how to pay for Notify in our data sharing and financial agreement.</p>
<p><a href="{{url_for('.feedback', ticket_type='ask-question-give-feedback')}}">Contact us</a> to get a copy of the agreement or find out if we already have one in place with your organisation.</p> <p>
<a href="{{url_for('.feedback', ticket_type='ask-question-give-feedback', body='Please send me a copy of the GOV.UK Notify data sharing and financial agreement.')}}">Contact us</a> to get a copy of the agreement
{% if agreement_info.agreement_signed %}
({{ agreement_info.owner }} has already accepted it).
{% else %}
{% if agreement_info.owner and agreement_info.agreement_signed != None %}
({{ agreement_info.owner }} hasnt accepted it yet).
{% else %}
or find out if we already have one in place with your organisation.
{% endif %}
{% endif %}
</p>
</div> </div>
</div> </div>

View File

@@ -102,13 +102,17 @@ def test_terms_is_generic_if_user_is_not_logged_in(
) )
@pytest.mark.parametrize('email_address, expected_first_paragraph', [ @pytest.mark.parametrize('email_address, expected_terms_paragraph, expected_pricing_paragraph', [
( (
'test@cabinet-office.gov.uk', 'test@cabinet-office.gov.uk',
( (
'Your organisation (Cabinet Office) has already accepted ' 'Your organisation (Cabinet Office) has already accepted '
'the GOV.UK Notify data sharing and financial agreement.' 'the GOV.UK Notify data sharing and financial agreement.'
), ),
(
'Contact us to get a copy of the agreement '
'(Cabinet Office has already accepted it).'
),
), ),
( (
'test@aylesburytowncouncil.gov.uk', 'test@aylesburytowncouncil.gov.uk',
@@ -117,6 +121,10 @@ def test_terms_is_generic_if_user_is_not_logged_in(
'accept our data sharing and financial agreement. Contact ' 'accept our data sharing and financial agreement. Contact '
'us to get a copy.' 'us to get a copy.'
), ),
(
'Contact us to get a copy of the agreement '
'(Aylesbury Town Council hasnt accepted it yet).'
),
), ),
( (
'larry@downing-street.gov.uk', 'larry@downing-street.gov.uk',
@@ -124,6 +132,10 @@ def test_terms_is_generic_if_user_is_not_logged_in(
'Your organisation must also accept our data sharing and ' 'Your organisation must also accept our data sharing and '
'financial agreement. Contact us to get a copy.' 'financial agreement. Contact us to get a copy.'
), ),
(
'Contact us to get a copy of the agreement or find out if '
'we already have one in place with your organisation.'
),
), ),
]) ])
def test_terms_tells_logged_in_users_what_we_know_about_their_agreement( def test_terms_tells_logged_in_users_what_we_know_about_their_agreement(
@@ -131,10 +143,13 @@ def test_terms_tells_logged_in_users_what_we_know_about_their_agreement(
fake_uuid, fake_uuid,
client_request, client_request,
email_address, email_address,
expected_first_paragraph, expected_terms_paragraph,
expected_pricing_paragraph,
): ):
user = active_user_with_permissions(fake_uuid) user = active_user_with_permissions(fake_uuid)
user.email_address = email_address user.email_address = email_address
mocker.patch('app.user_api_client.get_user', return_value=user) mocker.patch('app.user_api_client.get_user', return_value=user)
page = client_request.get('main.terms') terms_page = client_request.get('main.terms')
assert normalize_spaces(page.select('main p')[1].text) == expected_first_paragraph pricing_page = client_request.get('main.pricing')
assert normalize_spaces(terms_page.select('main p')[1].text) == expected_terms_paragraph
assert normalize_spaces(pricing_page.select('main p')[-1].text) == expected_pricing_paragraph