From 0c86fd713cd47a07a1a97d76cd035788eaacd2cc Mon Sep 17 00:00:00 2001 From: Kaitlyn Date: Wed, 26 Feb 2025 13:40:31 -0500 Subject: [PATCH] MNTOR-3953 - Add monthly report free email state for expired sub --- .../MonthlyActivityFreeEmail.stories.tsx | 20 +++++++++++++++++++ .../MonthlyActivityFreeEmail.tsx | 6 ++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.stories.tsx b/src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.stories.tsx index c64711f642d..5274160a9be 100644 --- a/src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.stories.tsx +++ b/src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.stories.tsx @@ -190,3 +190,23 @@ export const MonthlyReportFreeUserWithoutScanNoExposures: Story = { } as SanitizedSubscriberRow, }, }; + +export const MonthlyReportFreeUserWithScanExpiredSubscriptionWithPastExposures: Story = + { + name: "With Scan Expired Subscription With Previously Removed Exposures", + args: { + unsubscribeLink: "/", + dataSummary: { + ...mockedDataSummary, + dataBreachResolvedNum: 0, + dataBrokerAutoFixedDataPointsNum: 10, + }, + subscriber: { + onerep_profile_id: 1, + fxa_profile_json: { + locale: "en-US", + subscriptions: ["not-monitor-plus"], + }, + } as SanitizedSubscriberRow, + }, + }; diff --git a/src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.tsx b/src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.tsx index b8e9b268254..39fdaf6194e 100644 --- a/src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.tsx +++ b/src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.tsx @@ -110,8 +110,10 @@ export const MonthlyActivityFreeEmail = ( ? "email-monthly-report-free-summary-auto-removed" : "email-monthly-report-free-broker-scan-available", // Show number of free scans if a scan hasn't been run - // If a free scan is run, show 0 auto-removed exposures - dataPointValue: hasRunFreeScan ? 0 : 1, + // If a free scan is run, show auto-removed exposures (should be 0, unless a user has an expired sub with previously removed exposures) + dataPointValue: hasRunFreeScan + ? props.dataSummary.dataBrokerAutoFixedDataPointsNum + : 1, }; // Show the congratulatory banner if a user does not have any remaining exposures left to resolve