Skip to content

Commit c7d7490

Browse files
authored
MNTOR-3953 - Add monthly report free email state for expired sub (#5668)
1 parent 63de2ed commit c7d7490

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.stories.tsx

+20
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,23 @@ export const MonthlyReportFreeUserWithoutScanNoExposures: Story = {
190190
} as SanitizedSubscriberRow,
191191
},
192192
};
193+
194+
export const MonthlyReportFreeUserWithScanExpiredSubscriptionWithPastExposures: Story =
195+
{
196+
name: "With Scan Expired Subscription With Previously Removed Exposures",
197+
args: {
198+
unsubscribeLink: "/",
199+
dataSummary: {
200+
...mockedDataSummary,
201+
dataBreachResolvedNum: 0,
202+
dataBrokerAutoFixedDataPointsNum: 10,
203+
},
204+
subscriber: {
205+
onerep_profile_id: 1,
206+
fxa_profile_json: {
207+
locale: "en-US",
208+
subscriptions: ["not-monitor-plus"],
209+
},
210+
} as SanitizedSubscriberRow,
211+
},
212+
};

src/emails/templates/monthlyActivityFree/MonthlyActivityFreeEmail.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ export const MonthlyActivityFreeEmail = (
110110
? "email-monthly-report-free-summary-auto-removed"
111111
: "email-monthly-report-free-broker-scan-available",
112112
// Show number of free scans if a scan hasn't been run
113-
// If a free scan is run, show 0 auto-removed exposures
114-
dataPointValue: hasRunFreeScan ? 0 : 1,
113+
// If a free scan is run, show auto-removed exposures (should be 0, unless a user has an expired sub with previously removed exposures)
114+
dataPointValue: hasRunFreeScan
115+
? props.dataSummary.dataBrokerAutoFixedDataPointsNum
116+
: 1,
115117
};
116118

117119
// Show the congratulatory banner if a user does not have any remaining exposures left to resolve

0 commit comments

Comments
 (0)