Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNTOR-3953 - Add monthly report free email state for expired sub #5668

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Is showing the auto-removed exposures as 1 when no scan has been run correct here: Wouldn’t there be no exposures that could have been removed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see: In this scenario, without a used free scan we don’t show the auto-removed exposures here, but the number of available scans.
image

};

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