Skip to content

Commit

Permalink
Update tests and use HTML for some content
Browse files Browse the repository at this point in the history
  • Loading branch information
hawx committed Dec 11, 2024
1 parent 847b625 commit bc08377
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/donor/dashboard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('Dashboard', () => {

cy.contains('Property and affairs');
cy.contains('Sam Smith');
cy.contains('strong', 'Withdrawn');
cy.contains('strong', 'Revoked');
cy.contains('.app-dashboard-card a').should('not.exist');
cy.get('.app-dashboard-row a').should('have.length', 1);
cy.contains('a', 'View LPA');
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/donor/withdraw-lpa.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ describe('Withdraw LPA', () => {
cy.contains('a', 'Withdraw LPA').click();

cy.checkA11yApp();
cy.contains('button', 'Withdraw this LPA').click();
cy.contains('button', 'Revoke this LPA').click();

cy.checkA11yApp();
cy.contains('You have withdrawn');
cy.contains('You have revoked');
cy.contains('a', 'Return to dashboard').click();

cy.contains('.app-dashboard-card', 'Sam Smith').contains('.app-tag', 'Withdrawn');
cy.contains('.app-dashboard-card', 'Sam Smith').contains('.app-tag', 'Revoked');
});
});
2 changes: 1 addition & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@
"withdrawingThisLpaIsPermanent": "Revoking this LPA is permanent and cannot be undone.",
"lpaWithdrawn": "LPA revoked",
"youHaveWithdrawnLpaNumber": "You have revoked LPA number <span class=\"govuk-!-font-weight-bold\">{{.UID}}</span>.",
"opgWillNowContactAnyoneWhoHasAlreadyBeenContacted": "<p class=\\\"govuk-body\\\">The Office of the Public Guardian (OPG) will not register it and it cannot be used as a legal document.</p><p class=\\\"govuk-body\\\">OPG will contact anyone who has already been contacted in relation to your LPA and notify them of your decision to revoke.</p>",
"opgWillNowContactAnyoneWhoHasAlreadyBeenContacted": "<p class=\"govuk-body\">The Office of the Public Guardian (OPG) will not register it and it cannot be used as a legal document.</p><p class=\"govuk-body\">OPG will contact anyone who has already been contacted in relation to your LPA and notify them of your decision to revoke.</p>",
"withdrawn": "Revoked",
"dateLpaSigned": "Date LPA signed",
"whatIsYourPreviousReferenceNumber": "What is your previous reference number?",
Expand Down
2 changes: 1 addition & 1 deletion web/template/lpa_withdrawn.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="govuk-grid-column-two-thirds">
{{ template "notification-banner" (notificationBanner .App "lpaWithdrawn" (trFormatHtml .App "youHaveWithdrawnLpaNumber" "UID" (.App.Query.Get "uid")) "success") }}

<p class="govuk-body">{{ tr .App "opgWillNowContactAnyoneWhoHasAlreadyBeenContacted" }}</p>
{{ trHtml .App "opgWillNowContactAnyoneWhoHasAlreadyBeenContacted" }}

<a href="{{ link .App global.Paths.Dashboard.Format }}" class="govuk-button">{{ tr .App "returnToDashboard" }}</a>
</div>
Expand Down

0 comments on commit bc08377

Please sign in to comment.