Skip to content
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

Merged
merged 11 commits into from Feb 26, 2024

Conversation

usman-j-shaikh
Copy link
Contributor

No description provided.

@sonarcloud
Copy link

sonarcloud bot commented Sep 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@paulsimonandrews paulsimonandrews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@paulsimonandrews paulsimonandrews left a 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',
Copy link
Contributor

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'
Copy link
Contributor

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'
Copy link
Contributor

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{% extends 'form-layout.html' %}

{% set serviceName = "Purchase statutory biodiversity credits" %}
{% set pageHeading = "Terms and Conditions for the purchase of Statutory Biodiversity Credits" %}
Copy link
Contributor

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>
Copy link
Contributor

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."
Copy link
Contributor

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" %}
Copy link
Contributor

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',
Copy link
Contributor

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')
Copy link
Contributor

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

Copy link
Contributor

@paulsimonandrews paulsimonandrews left a 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',
Copy link
Contributor

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

Copy link

sonarcloud bot commented Feb 26, 2024

Copy link
Contributor

@paulsimonandrews paulsimonandrews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shaundefra
Copy link
Collaborator

Tested by Tajinder

@shaundefra shaundefra merged commit af73400 into master Feb 26, 2024
3 checks passed
@shaundefra shaundefra deleted the feature/BNGP-2885-credits-t-and-c branch February 26, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants