Skip to content

Commit

Permalink
update heading copy for cancellation confirmation page. Also update c…
Browse files Browse the repository at this point in the history
…ypress test selectors for the same heading.
  • Loading branch information
Richard Bangay committed Jun 4, 2024
1 parent 5bb8673 commit 5d2b06a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions client/components/mma/cancel/CancellationSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ const actuallyCancelled = (
) => {
const deliveryRecordsLink: string = `/delivery/${productType.urlPart}/records`;
const subscription = productDetail.subscription;
const headingCopy =
productType.productType === 'supporterplus'
? 'Your subscription has been cancelled'
: `Your ${productType.friendlyName(
cancelledProductDetail,
)} is cancelled`;
return (
<>
<WithStandardTopMargin>
Expand All @@ -36,10 +42,7 @@ const actuallyCancelled = (
`,
]}
>
{`Your ${
productType.shortFriendlyName ||
productType.friendlyName(cancelledProductDetail)
} is cancelled`}
{headingCopy}
</Heading>
{productType.cancellation &&
!productType.cancellation.shouldHideSummaryMainPara && (
Expand Down
4 changes: 2 additions & 2 deletions cypress/tests/mocked/parallel-2/cancelSupporterPlus.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('Cancel Supporter Plus', () => {
cy.wait('@get_cancelled_product');

cy.findByRole('heading', {
name: 'Your all-access digital is cancelled',
name: 'Your subscription has been cancelled',
});

cy.get('@get_cancellation_date.all').should('have.length', 0);
Expand Down Expand Up @@ -246,7 +246,7 @@ describe('Cancel Supporter Plus', () => {
cy.wait('@get_cancelled_product');

cy.findByRole('heading', {
name: 'Your all-access digital is cancelled',
name: 'Your subscription has been cancelled',
});

cy.get('@get_cancellation_date.all').should('have.length', 0);
Expand Down

0 comments on commit 5d2b06a

Please sign in to comment.