-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BNGP-2885- initial commit for terms and conditions #427
Conversation
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
5b4a9d2
to
e7b0265
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update constant names and content errors as requested in comments
@@ -1,12 +1,19 @@ | |||
const routes = { | |||
ESTIMATOR_CREDITS_INDIVIDUAL_ORG: '/credits-purchase/applying-individual-organisation' | |||
ESTIMATOR_CREDITS_INDIVIDUAL_ORG: '/credits-purchase/applying-individual-organisation', | |||
CREDITS_TERM_AND_CONDITIONS: '/credits-purchase/credits-terms-and-conditions', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CREDITS_PURCHASE_TERMS_AND_CONDITIONS
Also the URL should be /credits-purchase/confirm-terms-conditions
ESTIMATOR_CREDITS_INDIVIDUAL_ORG: '/credits-purchase/applying-individual-organisation' | ||
ESTIMATOR_CREDITS_INDIVIDUAL_ORG: '/credits-purchase/applying-individual-organisation', | ||
CREDITS_TERM_AND_CONDITIONS: '/credits-purchase/credits-terms-and-conditions', | ||
CREDITS_CHECK_YOUR_ANSWERS: '/credits-purchase/credits-check-your-answers' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CREDITS_PURCHASE_CHECK_YOUR_ANSWERS
} | ||
|
||
const views = Object.fromEntries( | ||
Object.entries(routes).map(([k, v]) => [k, v.substring(1)]) | ||
) | ||
|
||
const redisKeys = { | ||
CREDITS_TERMS_AND_CONDITIONS: 'credits-purchase-consent' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CREDITS_PURCHASE_TERMS_AND_CONDITIONS_CONFIRMED
<p>The statutory biodiversity credit scheme is run by Natural England on behalf of the Department for Environment, Food and Rural Affairs (Defra) as part of the Environment Act 2021.</p> | ||
|
||
<h2 class="govuk-heading-m">Privacy notice</h2> | ||
<p class="govuk-body">Our <a href="#">privacy notice </a>sets out how we use the personal data.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the same link as we use in the footer to the privacy notice: https://www.gov.uk/government/publications/natural-england-privacy-notices/biodiversity-net-gain-privacy-notice
{% extends 'form-layout.html' %} | ||
|
||
{% set serviceName = "Purchase statutory biodiversity credits" %} | ||
{% set pageHeading = "Terms and Conditions for the purchase of Statutory Biodiversity Credits" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only Terms
should be capitalised, the rest should all be lowercase
<h2 class="govuk-heading-m">Purchase terms</h2> | ||
<p class="govuk-body">You have no obligation to Natural England to buy the statutory biodiversity credits in this service. The terms and conditions for purchase of statutory biodiversity credits will apply if you proceed.</p> | ||
|
||
<h2 class="govuk-heading-m">Introduction</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This heading should be at the top, and the paragraph below is a repeat of what is at the top
items: [ | ||
{ | ||
value: "true", | ||
html: "I confirm I have read the terms and conditions." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "I confirm I have read the above, and the full terms and conditions"
@@ -0,0 +1,58 @@ | |||
{% extends 'form-layout.html' %} | |||
|
|||
{% set serviceName = "Purchase statutory biodiversity credits" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be: "Buy statutory biodiversity credits"
if (!consent) { | ||
return h.view(creditsPurchaseConstants.views.CREDITS_TERM_AND_CONDITIONS, { | ||
err: [{ | ||
text: 'Check the box to confirm you have read the Ts and Cs', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "Check the box to confirm you have read the terms and conditions"
postOptions.payload.termsAndConditions = undefined | ||
const res = await submitPostRequest(postOptions, 200) | ||
expect(res.payload).toContain('There is a problem') | ||
expect(res.payload).toContain('Check the box to confirm you have read the Ts and Cs') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to change as content is wrong in the page
7f5d185
to
cefd280
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to change the URL for the route (and rename the route and views files accordingly)
CREDITS_PURCHASE_CHECK_DEFRA_ACCOUNT_DETAILS: '/credits-purchase/check-defra-account-details' | ||
CREDITS_PURCHASE_CHECK_DEFRA_ACCOUNT_DETAILS: '/credits-purchase/check-defra-account-details', | ||
CREDITS_PURCHASE_INDIVIDUAL_ORG: '/credits-purchase/applying-individual-organisation', | ||
CREDITS_PURCHASE_TERMS_AND_CONDITIONS: '/credits-purchase/credits-terms-and-conditions', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL should be: /credits-purchase/confirm-terms-conditions
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tested by Tajinder |
No description provided.