-
Notifications
You must be signed in to change notification settings - Fork 27
Remove upgrade protection enums #3146
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
base: master
Are you sure you want to change the base?
Changes from all commits
05dfb28
1fbe1ce
06fdaf3
cd24669
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,9 @@ export const hasActiveLicense = ({ driver }: SetupFactoryOptions) => { | |
| }); | ||
| return licenseResponseTemplate; | ||
| }; | ||
| export const hasExpiredLicense = (licenseType: LicenseType, expiredDays: number = 10, extensionUrl: string = "") => getLicenseMockedResponse(licenseType, expiredDays, extensionUrl, true); | ||
| export const hasExpiringLicense = (licenseType: LicenseType, expiringInDays: number = 10, extensionUrl: string = "") => getLicenseMockedResponse(licenseType, expiringInDays, extensionUrl, false); | ||
| export const hasExpiredLicense = (licenseType: LicenseType.Subscription | LicenseType.Trial, expiredDays: number = 10, extensionUrl: string = "") => getLicenseMockedResponse(licenseType, expiredDays, extensionUrl, true); | ||
| export const hasExpiringLicense = (licenseType: LicenseType.Subscription | LicenseType.Trial, expiringInDays: number = 10, extensionUrl: string = "") => getLicenseMockedResponse(licenseType, expiringInDays, extensionUrl, false); | ||
| export const hasUnsupportedUpgradeProtectionLicense = (protectionDateOffset: number = 10) => getLicenseMockedResponse(LicenseType.UpgradeProtection, protectionDateOffset, "", false); | ||
|
|
||
| const getLicenseMockedResponse = | ||
| (licenseType: LicenseType, expiringInDays: number, extensionUrl: string, isExpired: boolean) => | ||
|
|
@@ -48,7 +49,7 @@ const getLicenseMockedResponse = | |
| licenseExtensionUrl = extensionUrl ? extensionUrl : "https://particular.net/extend-your-trial?p=servicepulse"; | ||
| break; | ||
| case LicenseType.UpgradeProtection: | ||
| status = isExpired ? LicenseStatus.InvalidDueToExpiredUpgradeProtection : LicenseStatus.ValidWithExpiringUpgradeProtection; | ||
| status = LicenseStatus.InvalidDueToUpgradeProtectionNoLongerBeingSupported; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in |
||
| upgradeProtectionExpiration = customISOString; | ||
| licenseExtensionUrl = extensionUrl ? extensionUrl : "https://particular.net/extend-your-trial?p=servicepulse"; | ||
| break; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the notification to say upgrade-protection licenses are no longer supported, while preserving the expired-license copy for expired trial/subscription statuses. Added coverage; commit
06fdaf3b.