Skip to content

Commit

Permalink
Merge pull request #1741 from ministryofjustice/MLPAB-2675-identity-d…
Browse files Browse the repository at this point in the history
…etails-vouched

MLPAB-2675 Show success banner when identity vouched for
  • Loading branch information
hawx authored Jan 28, 2025
2 parents d6f5f73 + 309f932 commit 3ca19b7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
10 changes: 10 additions & 0 deletions cypress/e2e/donor/confirm-your-identity.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions internal/page/fixtures/donor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down
3 changes: 2 additions & 1 deletion lang/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1548,5 +1548,6 @@
"repeatApplication:NoFee": "Welsh",
"weWillContactYouIfRepeatExemptionContent": "<p class=\"govuk-body\">Welsh</p>",
"weContactYouToAskForMoreEvidence": "Welsh",
"youMustUploadMoreEvidenceAboutLpaFeeWeContactYou": "Welsh"
"youMustUploadMoreEvidenceAboutLpaFeeWeContactYou": "Welsh",
"voucherHasSuccessfullyConfirmedYourIdentity": "<div class=\"govuk-notification-banner__content\"><h2 class=\"govuk-notification-banner__heading\">{{.VoucherFullName}} Welsh</h2><p class=\"govuk-body\">Welsh</p></div>"
}
3 changes: 2 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1444,5 +1444,6 @@
"repeatApplication:NoFee": "Repeat application, no fee",
"weWillContactYouIfRepeatExemptionContent": "<p class=\"govuk-body\">We will contact you if:</p><ul class=\"govuk-list govuk-list--bullet\"><li>we need more information</li><li>your application for a reduced or no fee is unsuccessful and there is a fee to pay</li><li>your application for a reduced or no fee is successful and your LPA is paid</li></ul>",
"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": "<div class=\"govuk-notification-banner__content\"><h2 class=\"govuk-notification-banner__heading\">{{.VoucherFullName}} has successfully confirmed your identity</h2><p class=\"govuk-body\">Thank you for confirming your identity through vouching. Your details match those you entered in your LPA.</p></div>"
}
4 changes: 3 additions & 1 deletion web/template/donor/identity_details.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 3ca19b7

Please sign in to comment.