return`Your subscription will renew soon. To ensure uninterrupted service, contact ${args[0]} to confirm your renewal before ${args[1]}.`;
case"resellerRenewalWarningMsgV2":
return`Your subscription will renew soon. To ensure uninterrupted service, contact your Bitwarden provider to confirm your renewal before ${args[0]}.`;
case"resellerOpenInvoiceWarningMgs":
return`An invoice for your subscription was issued on ${args[1]}. To ensure uninterrupted service, contact ${args[0]} to confirm your renewal before ${args[2]}.`;
case"resellerPastDueWarningMsg":
return`The invoice for your subscription has not been paid. To ensure uninterrupted service, contact ${args[0]} to confirm your renewal before ${args[1]}.`;
case"resellerPastDueWarningMsgV2":
return`The invoice for your subscription has not been paid. To ensure uninterrupted service, contact your Bitwarden provider before ${args[0]}.`;
message:`Your subscription will renew soon. To ensure uninterrupted service, contact Test Reseller Inc to confirm your renewal before ${expectedFormattedDate}.`,
message:`Your subscription will renew soon. To ensure uninterrupted service, contact your Bitwarden provider to confirm your renewal before ${expectedFormattedDate}.`,
});
expect(i18nService.t).toHaveBeenCalledWith(
"resellerRenewalWarningMsg",
"Test Reseller Inc",
"resellerRenewalWarningMsgV2",
expectedFormattedDate,
);
done();
});
});
it("should return issued warning with correct type and message",(done)=>{
it("should return null for issued warning type",(done)=>{
message:`An invoice for your subscription was issued on ${expectedIssuedDate}. To ensure uninterrupted service, contact Test Reseller Inc to confirm your renewal before ${expectedDueDate}.`,
message:`The invoice for your subscription has not been paid. To ensure uninterrupted service, contact Test Reseller Inc to confirm your renewal before ${expectedSuspensionDate}.`,
type:"info",
message:`The invoice for your subscription has not been paid. To ensure uninterrupted service, contact your Bitwarden provider before ${expectedSuspensionDate}.`,
"message":"Your subscription will renew soon. To ensure uninterrupted service, contact your Bitwarden provider to confirm your renewal before $RENEWAL_DATE$.",
"placeholders":{
"renewal_date":{
"content":"$1",
"example":"01/01/2024"
}
}
},
"resellerOpenInvoiceWarningMgs":{
"message":"An invoice for your subscription was issued on $ISSUED_DATE$. To ensure uninterrupted service, contact $RESELLER$ to confirm your renewal before $DUE_DATE$.",
"placeholders":{
@ -11988,6 +11997,15 @@
}
}
},
"resellerPastDueWarningMsgV2":{
"message":"The invoice for your subscription has not been paid. To ensure uninterrupted service, contact your Bitwarden provider before $GRACE_PERIOD_END$.",