diff --git a/cypress/e2e/donor/confirm-your-identity.cy.js b/cypress/e2e/donor/confirm-your-identity.cy.js index c26c22d30..95b57ec77 100644 --- a/cypress/e2e/donor/confirm-your-identity.cy.js +++ b/cypress/e2e/donor/confirm-your-identity.cy.js @@ -310,6 +310,16 @@ describe('Confirm your identity', () => { }) }) + describe('when voucher has vouched', () => { + beforeEach(() => { + cy.visit('/fixtures?redirect=/identity-details&progress=confirmYourIdentity&idStatus=donor:vouched'); + }); + + it('it shows a success banner', () => { + cy.contains('Thank you for confirming your identity through vouching'); + }) + }) + describe('when a voucher has been unable to vouch', () => { beforeEach(() => { cy.visit('/fixtures?redirect=/task-list&progress=confirmYourIdentity&idStatus=donor:insufficient-evidence&failedVouchAttempts=1'); diff --git a/internal/page/fixtures/donor.go b/internal/page/fixtures/donor.go index 2e65a825d..157b97f50 100644 --- a/internal/page/fixtures/donor.go +++ b/internal/page/fixtures/donor.go @@ -486,6 +486,7 @@ func updateLPAProgress( donorDetails.Tasks.ConfirmYourIdentity = task.IdentityStatePending case "vouched": donorDetails.Voucher = makeVoucher(voucherName) + donorDetails.WantVoucher = form.Yes ctx := appcontext.ContextWithSession(r.Context(), &appcontext.Session{SessionID: random.String(16), LpaID: donorDetails.LpaID}) diff --git a/lang/cy.json b/lang/cy.json index c03e4cba7..b0c29c418 100644 --- a/lang/cy.json +++ b/lang/cy.json @@ -1548,5 +1548,6 @@ "repeatApplication:NoFee": "Welsh", "weWillContactYouIfRepeatExemptionContent": "

Welsh

", "weContactYouToAskForMoreEvidence": "Welsh", - "youMustUploadMoreEvidenceAboutLpaFeeWeContactYou": "Welsh" + "youMustUploadMoreEvidenceAboutLpaFeeWeContactYou": "Welsh", + "voucherHasSuccessfullyConfirmedYourIdentity": "

{{.VoucherFullName}} Welsh

Welsh

" } diff --git a/lang/en.json b/lang/en.json index 0df3f4e61..6453309dc 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1444,5 +1444,6 @@ "repeatApplication:NoFee": "Repeat application, no fee", "weWillContactYouIfRepeatExemptionContent": "

We will contact you if:

", "weContactYouToAskForMoreEvidence": "We contacted you to ask for more evidence about you LPA fee", - "youMustUploadMoreEvidenceAboutLpaFeeWeContactYou": "You must upload more evidence about your LPA fee. We contacted you with details about the information we need." + "youMustUploadMoreEvidenceAboutLpaFeeWeContactYou": "You must upload more evidence about your LPA fee. We contacted you with details about the information we need.", + "voucherHasSuccessfullyConfirmedYourIdentity": "

{{.VoucherFullName}} has successfully confirmed your identity

Thank you for confirming your identity through vouching. Your details match those you entered in your LPA.

" } diff --git a/web/template/donor/identity_details.gohtml b/web/template/donor/identity_details.gohtml index e77568519..44570e847 100644 --- a/web/template/donor/identity_details.gohtml +++ b/web/template/donor/identity_details.gohtml @@ -11,7 +11,9 @@ {{ template "notification-banner" (notificationBanner .App "success" (trHtml .App "yourLPADetailsHaveBeenUpdatedToMatchIdentitySuccess") "success" "heading") }} {{ else if .DetailsMatch }} - {{ if not .Provided.WantVoucher.IsYes }} + {{ if .Provided.WantVoucher.IsYes }} + {{ template "notification-banner" (notificationBanner .App "success" (trFormatHtml .App "voucherHasSuccessfullyConfirmedYourIdentity" "VoucherFullName" .Provided.Voucher.FullName) "success" "contents" ) }} + {{ else }} {{ template "notification-banner" (notificationBanner .App "success" (trHtml .App "youHaveSuccessfullyConfirmedYourIdentitySuccess:donor") "success" "contents" ) }} {{ end }} {{ else if .Provided.CanChange }}