From 53371f433a1d98fd277900ed85ec07884d3ed00a Mon Sep 17 00:00:00 2001 From: Tom Wey Date: Tue, 21 Jan 2025 09:47:35 +0000 Subject: [PATCH] Complete the removal of Guardian Light (#6702) Update the support-services-lambdas package to bring in removal of the GuardianLight product from the catalog and type object. At this point we've completely moved over to the new Guardian Ad-Lite product. --- support-e2e/tests/test/checkout.ts | 1 - .../forms/paymentIntegrations/readerRevenueApis.ts | 6 ------ support-frontend/assets/helpers/productCatalog.ts | 10 ---------- .../checkout/helpers/getProductFields.ts | 7 ------- .../[countryGroupId]/components/checkoutComponent.tsx | 9 ++------- .../[countryGroupId]/components/thankYouComponent.tsx | 3 +-- .../components/thankYouHeader/heading.tsx | 3 +-- .../components/thankYouHeader/subheading.tsx | 3 +-- support-frontend/package.json | 2 +- support-frontend/yarn.lock | 4 ++-- 10 files changed, 8 insertions(+), 40 deletions(-) diff --git a/support-e2e/tests/test/checkout.ts b/support-e2e/tests/test/checkout.ts index 337dca2769..1d422d14f0 100644 --- a/support-e2e/tests/test/checkout.ts +++ b/support-e2e/tests/test/checkout.ts @@ -26,7 +26,6 @@ const setUserDetailsForProduct = async ( ) => { switch (product) { case 'SupporterPlus': - case 'GuardianLight': case 'GuardianAdLite': await setTestUserRequiredDetails(page, email(), firstName(), lastName()); diff --git a/support-frontend/assets/helpers/forms/paymentIntegrations/readerRevenueApis.ts b/support-frontend/assets/helpers/forms/paymentIntegrations/readerRevenueApis.ts index 4c9505b3b9..44235c7dee 100644 --- a/support-frontend/assets/helpers/forms/paymentIntegrations/readerRevenueApis.ts +++ b/support-frontend/assets/helpers/forms/paymentIntegrations/readerRevenueApis.ts @@ -69,11 +69,6 @@ export type TierThree = { fulfilmentOptions: FulfilmentOptions; productOptions: ProductOptions; }; -export type GuardianLight = { - productType: 'GuardianLight'; - currency: string; - billingPeriod: BillingPeriod; -}; export type GuardianAdLite = { productType: 'GuardianAdLite'; currency: string; @@ -106,7 +101,6 @@ export type SubscriptionProductFields = | PaperSubscription | GuardianWeeklySubscription | TierThree - | GuardianLight | GuardianAdLite; type ProductFields = RegularContribution | SubscriptionProductFields; type RegularPayPalPaymentFields = { diff --git a/support-frontend/assets/helpers/productCatalog.ts b/support-frontend/assets/helpers/productCatalog.ts index bbc1123327..696b4fbe91 100644 --- a/support-frontend/assets/helpers/productCatalog.ts +++ b/support-frontend/assets/helpers/productCatalog.ts @@ -148,16 +148,6 @@ export const productCatalogDescription: Record< ActiveProductKey, ProductDescription > = { - GuardianLight: { - label: 'Guardian Ad-Lite', - thankyouMessage: `Your valued support powers our journalism${' '}`, - ratePlans: { - Monthly: { - billingPeriod: 'Monthly', - }, - }, - benefits: guardianAdLiteBenefits, - }, GuardianAdLite: { label: 'Guardian Ad-Lite', thankyouMessage: `Your valued support powers our journalism${' '}`, diff --git a/support-frontend/assets/pages/[countryGroupId]/checkout/helpers/getProductFields.ts b/support-frontend/assets/pages/[countryGroupId]/checkout/helpers/getProductFields.ts index 883a1b18f8..8499778734 100644 --- a/support-frontend/assets/pages/[countryGroupId]/checkout/helpers/getProductFields.ts +++ b/support-frontend/assets/pages/[countryGroupId]/checkout/helpers/getProductFields.ts @@ -45,13 +45,6 @@ export const getProductFields = ({ * We might be able to defer this to the backend. */ switch (productKey) { - case 'GuardianLight': - return { - productType: 'GuardianLight', - currency: currencyKey, - billingPeriod: ratePlanDescription.billingPeriod, - }; - case 'GuardianAdLite': return { productType: 'GuardianAdLite', diff --git a/support-frontend/assets/pages/[countryGroupId]/components/checkoutComponent.tsx b/support-frontend/assets/pages/[countryGroupId]/components/checkoutComponent.tsx index 474f3e714e..8e81ed04ac 100644 --- a/support-frontend/assets/pages/[countryGroupId]/components/checkoutComponent.tsx +++ b/support-frontend/assets/pages/[countryGroupId]/components/checkoutComponent.tsx @@ -669,7 +669,7 @@ export function CheckoutComponent({ const returnParam = returnLink ? '?returnAddress=' + returnLink : ''; const returnToLandingPage = - productKey === 'GuardianLight' || productKey === 'GuardianAdLite' + productKey === 'GuardianAdLite' ? `/guardian-ad-lite${returnParam}` : `/${geoId}/contribute`; @@ -766,12 +766,7 @@ export function CheckoutComponent({ headerButton={ } /> diff --git a/support-frontend/assets/pages/[countryGroupId]/components/thankYouComponent.tsx b/support-frontend/assets/pages/[countryGroupId]/components/thankYouComponent.tsx index f10ec52493..ba839abf20 100644 --- a/support-frontend/assets/pages/[countryGroupId]/components/thankYouComponent.tsx +++ b/support-frontend/assets/pages/[countryGroupId]/components/thankYouComponent.tsx @@ -206,8 +206,7 @@ export function ThankYouComponent({ return
Unable to find contribution type {contributionType}
; } - const isGuardianAdLite = - productKey === 'GuardianLight' || productKey === 'GuardianAdLite'; + const isGuardianAdLite = productKey === 'GuardianAdLite'; const isOneOffPayPal = order.paymentMethod === 'PayPal' && isOneOff; const isSupporterPlus = productKey === 'SupporterPlus'; const isTier3 = productKey === 'TierThree'; diff --git a/support-frontend/assets/pages/supporter-plus-thank-you/components/thankYouHeader/heading.tsx b/support-frontend/assets/pages/supporter-plus-thank-you/components/thankYouHeader/heading.tsx index 1f6e3b7e9a..c4c001339b 100644 --- a/support-frontend/assets/pages/supporter-plus-thank-you/components/thankYouHeader/heading.tsx +++ b/support-frontend/assets/pages/supporter-plus-thank-you/components/thankYouHeader/heading.tsx @@ -197,8 +197,7 @@ function Heading({ promotion, }: HeadingProps): JSX.Element { const isPending = paymentStatus === 'pending'; - const isGuardianAdLite = - productKey === 'GuardianLight' || productKey === 'GuardianAdLite'; + const isGuardianAdLite = productKey === 'GuardianAdLite'; const isTier3 = productKey === 'TierThree'; const maybeNameAndTrailingSpace: string = name && name.length < 10 ? `${name} ` : ''; diff --git a/support-frontend/assets/pages/supporter-plus-thank-you/components/thankYouHeader/subheading.tsx b/support-frontend/assets/pages/supporter-plus-thank-you/components/thankYouHeader/subheading.tsx index f3c8de0bff..e7ab3b6ca0 100644 --- a/support-frontend/assets/pages/supporter-plus-thank-you/components/thankYouHeader/subheading.tsx +++ b/support-frontend/assets/pages/supporter-plus-thank-you/components/thankYouHeader/subheading.tsx @@ -109,8 +109,7 @@ function Subheading({ paymentStatus, }: SubheadingProps): JSX.Element { const isTier3 = productKey === 'TierThree'; - const isGuardianAdLite = - productKey === 'GuardianLight' || productKey === 'GuardianAdLite'; + const isGuardianAdLite = productKey === 'GuardianAdLite'; const subheadingCopy = getSubHeadingCopy( productKey, amountIsAboveThreshold, diff --git a/support-frontend/package.json b/support-frontend/package.json index 906aebb23b..f3755128f2 100644 --- a/support-frontend/package.json +++ b/support-frontend/package.json @@ -85,7 +85,7 @@ "@guardian/pasteup": "1.0.0-alpha.7", "@guardian/source": "8.0.0", "@guardian/source-development-kitchen": "13.1.0", - "@guardian/support-service-lambdas": "guardian/support-service-lambdas#1cac223aa8cf278f4e70cb39dc0f7740304e4566", + "@guardian/support-service-lambdas": "guardian/support-service-lambdas#954a612fbce077790fa2d00c6e159b8d384f3e14", "@guardian/tsconfig": "^0.2.0", "@reduxjs/toolkit": "^1.9.4", "@sentry/browser": "^8.33.1", diff --git a/support-frontend/yarn.lock b/support-frontend/yarn.lock index 2b1c092c5a..567cddf5e9 100644 --- a/support-frontend/yarn.lock +++ b/support-frontend/yarn.lock @@ -1836,9 +1836,9 @@ dependencies: mini-svg-data-uri "1.4.4" -"@guardian/support-service-lambdas@guardian/support-service-lambdas#1cac223aa8cf278f4e70cb39dc0f7740304e4566": +"@guardian/support-service-lambdas@guardian/support-service-lambdas#954a612fbce077790fa2d00c6e159b8d384f3e14": version "1.0.0" - resolved "https://codeload.github.com/guardian/support-service-lambdas/tar.gz/1cac223aa8cf278f4e70cb39dc0f7740304e4566" + resolved "https://codeload.github.com/guardian/support-service-lambdas/tar.gz/954a612fbce077790fa2d00c6e159b8d384f3e14" "@guardian/tsconfig@^0.2.0": version "0.2.0"