Skip to content

Commit

Permalink
MLPAB-2386: Certificate provider opt out content updates (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
acsauk authored Aug 13, 2024
1 parent 138fc3e commit a6815bc
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ describe('Choose not to be a certificate provider', () => {
cy.url().should('contain', '/you-have-decided-not-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('We have contacted Sam Smith')
cy.contains('You have confirmed that you do not want to be Sam Smith’s certificate provider')
cy.contains('We have let Sam know about your decision.')
});

it('when LPA has not been signed and witnessed', () => {
Expand All @@ -43,7 +44,8 @@ describe('Choose not to be a certificate provider', () => {
cy.url().should('contain', '/you-have-decided-not-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('We have contacted Sam Smith')
cy.contains('You have confirmed that you do not want to be Sam Smith’s certificate provider')
cy.contains('We have let Sam know about your decision.')
});
})
})
3 changes: 2 additions & 1 deletion cypress/e2e/certificate-provider/provide-certificate.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ describe('Provide the certificate', () => {
cy.url().should('contain', '/you-have-decided-not-to-be-a-certificate-provider')
cy.checkA11yApp();

cy.contains('We have contacted Sam Smith')
cy.contains('You have confirmed that you do not want to be Sam Smith’s certificate provider')
cy.contains('We have let Sam know about your decision.')
});

it("errors when not selected", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ func ConfirmDontWantToBeCertificateProvider(tmpl template.Template, lpaStoreReso
return err
}

return page.PathCertificateProviderYouHaveDecidedNotToBeCertificateProvider.RedirectQuery(w, r, appData, url.Values{"donorFullName": {lpa.Donor.FullName()}})
return page.PathCertificateProviderYouHaveDecidedNotToBeCertificateProvider.RedirectQuery(w, r, appData, url.Values{
"donorFullNamePossessive": {appData.Localizer.Possessive(lpa.Donor.FullName())},
"donorFirstNames": {lpa.Donor.FirstNames},
})
}

return tmpl(w, data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ func ConfirmDontWantToBeCertificateProviderLoggedOut(tmpl template.Template, sha
return err
}

return page.PathCertificateProviderYouHaveDecidedNotToBeCertificateProvider.RedirectQuery(w, r, appData, url.Values{"donorFullName": {lpa.Donor.FullName()}})
return page.PathCertificateProviderYouHaveDecidedNotToBeCertificateProvider.RedirectQuery(w, r, appData, url.Values{
"donorFullNamePossessive": {appData.Localizer.Possessive(lpa.Donor.FullName())},
"donorFirstNames": {lpa.Donor.FirstNames},
})
}

return tmpl(w, data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ func TestPostConfirmDontWantToBeCertificateProviderLoggedOut(t *testing.T) {
localizer.EXPECT().
T("personal-welfare").
Return("Personal welfare")
localizer.EXPECT().
Possessive("a b c").
Return("full name possessive")

testAppData.Localizer = localizer

Expand All @@ -296,7 +299,7 @@ func TestPostConfirmDontWantToBeCertificateProviderLoggedOut(t *testing.T) {
resp := w.Result()

assert.Nil(t, err)
assert.Equal(t, page.PathCertificateProviderYouHaveDecidedNotToBeCertificateProvider.Format()+"?donorFullName=a+b+c", resp.Header.Get("Location"))
assert.Equal(t, page.PathCertificateProviderYouHaveDecidedNotToBeCertificateProvider.Format()+"?donorFirstNames=a+b&donorFullNamePossessive=full+name+possessive", resp.Header.Get("Location"))
assert.Equal(t, http.StatusFound, resp.StatusCode)
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ func TestPostConfirmDontWantToBeCertificateProvider(t *testing.T) {
localizer.EXPECT().
T("personal-welfare").
Return("Personal welfare")
localizer.EXPECT().
Possessive("a b c").
Return("full name possessive")

testAppData.Localizer = localizer

Expand All @@ -247,7 +250,7 @@ func TestPostConfirmDontWantToBeCertificateProvider(t *testing.T) {
resp := w.Result()

assert.Nil(t, err)
assert.Equal(t, page.PathCertificateProviderYouHaveDecidedNotToBeCertificateProvider.Format()+"?donorFullName=a+b+c", resp.Header.Get("Location"))
assert.Equal(t, page.PathCertificateProviderYouHaveDecidedNotToBeCertificateProvider.Format()+"?donorFirstNames=a+b&donorFullNamePossessive=full+name+possessive", resp.Header.Get("Location"))
assert.Equal(t, http.StatusFound, resp.StatusCode)
})
}
Expand Down
10 changes: 4 additions & 6 deletions lang/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,7 @@
"yourLegalRightsAndResponsibilities": "Eich hawliau a’ch cyfrifoldebau cyfreithiol",
"yourLegalRightsAndResponsibilitiesContent:property-and-affairs": "<p class=\"govuk-body-l\">Cyn llofnodi, rhaid i chi ddarllen eich hawliau a’ch cyfrifoldebau cyfreithiol.</p><h2 class=\"govuk-heading-m\">Sut dylai eich atwrneiod weithredu</h2><p class=\"govuk-body\">Drwy lofnodi eich LPA, rydych yn penodi eich atwrneiod i wneud penderfyniadau ar eich rhan.</p><p class=\"govuk-body\">Rhaid i’ch atwrneiod ddilyn Deddf Galluedd Meddyliol 2005, rheoliadau a wneir oddi tani a’r <a class=\"govuk-link\" href=\"https://www.gov.uk/government/publications/mental-capacity-act-code-of-practice\">Cod Ymarfer</a>. Mae hyn yn cynnwys egwyddorion y Ddeddf Galluedd Meddyliol:</p><ul class=\"govuk-list govuk-list--bullet\"><li>rhaid iddynt dybio eich bod yn gallu gwneud eich penderfyniadau eich hun, oni bai y sefydlir na allwch wneud hynny</li><li>rhaid iddynt eich helpu i wneud cynifer o’ch penderfyniadau eich hun ag y gallwch</li><li>rhaid iddynt gymryd bob cam rhesymol i’ch helpu i wneud penderfyniad. Dim ond os nad ydynt wedi llwyddo i’ch helpu i wneud penderfyniad drwy’r camau hynny y gallant eich trin fel rhywun sydd ddim yn gallu gwneud penderfyniad</li><li>ni ddylent eich trin fel rhywun sydd ddim yn gallu gwneud penderfyniad oherwydd eich bod yn gwneud penderfyniad annoeth</li><li>pan na allwch wneud penderfyniad, rhaid iddynt weithredu a gwneud penderfyniadau er eich lles pennaf</li><li>cyn iddynt wneud penderfyniad neu weithredu ar eich rhan, rhaid iddynt ystyried unrhyw opsiwn sy’n cyfyngu llai ar eich hawliau a’ch rhyddid a allai arwain at yr un canlyniad</li></ul><h2 class=\"govuk-heading-m\">Sut gall eich LPA gael ei defnyddio</h2><ul class=\"govuk-list govuk-list--bullet\"><li>pan fyddwch yn llofnodi eich LPA, rydych chi’n creu gweithred. Mae’n ddogfen gyfreithiol sy’n rhoi pwerau penodol i’ch atwrneiod</li><li>dim ond pan fydd wedi’i chofrestru gyda Swyddfa’r Gwarcheidwad Cyhoeddus y gall eich LPA gael ei defnyddio</li><li>gallwch ganslo eich LPA unrhyw bryd os oes gennych alluedd meddyliol. <a class=\"govuk-link\" href=\"https://www.gov.uk/power-of-attorney/end\">Darllenwch fwy am sut i ganslo eich LPA</a></li><li>ni all eich atwrneiod ddefnyddio eich LPA i wneud newidiadau i’ch ewyllys</li><li>bydd eich LPA yn dod i ben pan fyddwch yn marw</li></ul>",
"yourLegalRightsAndResponsibilitiesContent:personal-welfare": "<p class=\"govuk-body\">Welsh</p>",
"whatHappensNextContent": "<p class=\"govuk-body\">Dylech fod wedi cwrdd a siarad â’r rhoddwr, {{ .DonorFullName }}.</p> <p class=\"govuk-body\">Dylech fod wedi dod i’r farn:</p> <ul class=\"govuk-list govuk-list--bullet\"> <li>eu bod yn deall yr LPA maent yn ei gwneud a beth mae’n ei olygu</li> <li>nad oes pwysau’n cael ei roi arnynt gan rywun arall i wneud yr LPA hon</li> <li>nad oes twyll yn gysylltiedig â gwneud yr LPA</li> <li>nad oes rheswm arall dros bryderu</li> </ul> <p class=\"govuk-body\">Mae’n bosibl y byddwch wedi gwneud nodiadau yn ystod eich sgwrs. Os bydd gennym unrhyw bryderon o gwbl, gallem ofyn i chi ddweud rhagor wrthym am y sgwrs a gawsoch â {{ .DonorFirstNames }}.</p> <h2 class=\"govuk-heading-m\">Penderfynu a ydych am ddarparu’ch tystysgrif</h2> <p class=\"govuk-body\">Rhaid i chi benderfynu nawr a ydych am ddarparu’r dystysgrif ar gyfer yr LPA hon.</p> <p class=\"govuk-body\">Os ydych yn barod ac nad oes gennych unrhyw bryderon, gallwch ddarparu’ch tystysgrif drwy ei llofnodi ar-lein. Gallwch wneud hyn ar y dudalen nesaf.</p>",
"ifYouHaveConcerns": "Os oes gennych bryderon ac nad ydych am lofnodi, bydd opsiwn hefyd ar y dudalen nesaf i ddweud wrthym nad ydych am ddarparu eich tystysgrif.",
"whatHappensNextContent": "<p class=\"govuk-body\">Dylech fod wedi cwrdd a siarad â’r rhoddwr, {{ .DonorFullName }}.</p> <p class=\"govuk-body\">Dylech fod wedi dod i’r farn:</p> <ul class=\"govuk-list govuk-list--bullet\"> <li>eu bod yn deall yr LPA maent yn ei gwneud a beth mae’n ei olygu</li> <li>nad oes pwysau’n cael ei roi arnynt gan rywun arall i wneud yr LPA hon</li> <li>nad oes twyll yn gysylltiedig â gwneud yr LPA</li> <li>nad oes rheswm arall dros bryderu</li> </ul> <p class=\"govuk-body\">Mae’n bosibl y byddwch wedi gwneud nodiadau yn ystod eich sgwrs. Os bydd gennym unrhyw bryderon o gwbl, gallem ofyn i chi ddweud rhagor wrthym am y sgwrs a gawsoch â {{ .DonorFirstNames }}.</p> <h2 class=\"govuk-heading-m\">Penderfynu a ydych am ddarparu’ch tystysgrif</h2> <p class=\"govuk-body\">Rhaid i chi benderfynu nawr a ydych am ddarparu’r dystysgrif ar gyfer yr LPA hon.</p> <p class=\"govuk-body\">Os ydych yn barod ac nad oes gennych unrhyw bryderon, gallwch ddarparu’ch tystysgrif drwy ei llofnodi ar-lein. Gallwch wneud hyn ar y dudalen nesaf.</p><div class=\"govuk-inset-text\"><p class=\"govuk-body\">Welsh {{ .DonorFirstNames }} Welsh</p><p class=\"govuk-body\">Welsh<p></div>",
"provideYourCertificate": "Darparu eich tystysgrif",
"provideTheCertificateForThisLpa": "Darparu’r dystysgrif ar gyfer yr LPA hon",
"provideTheCertificateForThisLpaContent": "<h2 class=\"govuk-heading-m\">Eich datganiad fel y darparwr tystysgrif</h2> <p class=\"govuk-body govuk-!-font-weight-bold\">Rwyf yn cadarnhau:</p> <ul class=\"govuk-list govuk-list--bullet\"> <li>fy mod yn 18 oed neu’n hŷn</li> <li>fy mod wedi darllen yr LPA hon</li> <li>nad wyf yn gweithredu fel atwrnai neu atwrnai wrth gefn ar gyfer yr LPA hon</li> <li>nad oes dim sy’n fy rhwystro rhag gweithredu fel y darparwr tystysgrif ar gyfer yr LPA hon</li> <li>fy mod un ai wedi adnabod y rhoddwr yn bersonol am o leiaf 2 flynedd <span class=\"govuk-!-font-weight-bold\">neu</span> fy mod yn rhywun sydd â’r sgiliau proffesiynol perthnasol i ddarparu’r dystysgrif ar gyfer yr LPA hon</li> <li>gall y wybodaeth a ddarparwyd gennyf gael ei defnyddio gan Swyddfa’r Gwarcheidwad Cyhoeddus wrth gyflawni ei dyletswyddau</li> </ul> <p class=\"govuk-body govuk-!-font-weight-bold\">Rwyf yn ardystio bod y canlynol yn wir, yn fy marn i, ar adeg llofnodi:</p> <ul class=\"govuk-list govuk-list--bullet\"> <li>bod y rhoddwr wedi deall pwrpas yr LPA hon a’r pŵer y mae’n ei roi i’w atwrneiod. Mae hyn yn golygu eu bod wedi gallu deall a chofio’r wybodaeth, ei defnyddio i wneud penderfyniad, er enghraifft drwy bwyso a mesur pa wybodaeth oedd bwysicaf, a’i chyfleu</li> <li>nad yw twyll na phwysau amhriodol yn dylanwadu ar y rhoddwr i greu’r LPA hon</li> <li>nad oes dim arall a fyddai’n atal yr LPA hon rhag cael ei chreu</li> </ul>",
Expand Down Expand Up @@ -1178,14 +1177,13 @@
"weSentAnEmailTheLpaIsReadyToRegister": "Welsh {{.SentOn}}",
"drafting": "Drafftio",
"waitingPeriod": "Cyfnod aros",
"certificateProviderReferenceNumberOptOutContent": "<p class=\"govuk-body\">Welsh</p>",
"enterYour12CharacterReferenceNumber": "Welsh",
"enterYour12CharacterReferenceNumberHint": "Welsh",
"confirmYouDoNotWantToBeACertificateProvider": "Cadarnhewch nad ydych am fod yn ddarparwr tystysgrif",
"confirmYouDoNotWantToBeACertificateProviderContent": "<p class=\"govuk-body\">Welsh {{ .DonorFullNamePossessive }} Welsh :</p> <div class=\"govuk-inset-text\"> <p class=\"govuk-!-margin-bottom-1\"><span class=\"govuk-!-font-weight-bold\">Welsh:</span> {{ .LpaType }}</p> <p class=\"govuk-!-margin-bottom-1 govuk-!-margin-top-1\"><span class=\"govuk-!-font-weight-bold\">Welsh:</span> {{ .LpaUID }}</p> </div>",
"whenYouSelectConfirmWeWillContactDonor": "Welsh {{ .DonorFirstNames }} Welsh",
"thankYou": "Welsh",
"weHaveContactedDonorToLetThemKnowYourDecision": "Welsh {{ .DonorFullName }} Welsh",
"youHaveConfirmedYouDoNotWantToBeACertificateProvider": "Welsh",
"youHaveConfirmedYouDoNotWantToBeDonorsCertificateProvider": "Welsh {{.DonorFullNamePossessive}} Welsh",
"reportAConcernContent": "<h2 class=\"govuk-heading-m\">Welsh</h2> <p class=\"govuk-body\">Welsh:</p> <ul class=\"govuk-list govuk-list--bullet\"> <li>Welsh: 0115 934 2777</li> <li>Welsh: <a class=\"govuk-link\" href=\"mailto:[email protected]\">[email protected]</a> </li> </ul> <p class=\"govuk-body\">Welsh <a class=\"govuk-link\" href=\"#\">Welsh</a> Welsh</p>",
"yourAddress": "Welsh",
"yourAddressWarning": "Welsh",
Expand Down Expand Up @@ -1300,7 +1298,7 @@
"whenYouConfirmWeWillContactToExplain": "Welsh {{.DonorFullName}}",
"youHaveConfirmedYouDoNotWantToBeAttorney": "Welsh",
"youHaveConfirmedYouDoNotWantToBeDonorsAttorney": "Welsh {{.DonorFullNamePossessive}}",
"youHaveConfirmedYouDoNotWantToBeAttorneyContent": "<p class=\"govuk-body\">Welsh {{.DonorFirstNames}}</p>",
"weHaveLetDonorKnowAboutYourDecision": "<p class=\"govuk-body\">Welsh {{.DonorFirstNames}}</p>",
"youHaveChosenNotToFormallyNotifyAnyone": "Welsh",
"theDonorHasChosenNotToFormallyNotifyAnyone": "Welsh",
"youMustDeleteTrustCorporationToChangeLpaType": "Welsh",
Expand Down
Loading

0 comments on commit a6815bc

Please sign in to comment.