mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
fix: add trial expired warning for enterprise (#3997)
Adds the trial expired warning for enterprise as well.
This commit is contained in:
parent
4cc1505308
commit
dcac61e4d9
@ -82,6 +82,7 @@ export const BillingPlan: FC<IBillingPlanProps> = ({ instanceStatus }) => {
|
||||
[InstancePlan.PRO]: 80,
|
||||
[InstancePlan.COMPANY]: 0,
|
||||
[InstancePlan.TEAM]: 0,
|
||||
[InstancePlan.ENTERPRISE]: 0,
|
||||
[InstancePlan.UNKNOWN]: 0,
|
||||
user: 15,
|
||||
};
|
||||
|
@ -104,7 +104,7 @@ export const InstanceStatus: FC = ({ children }) => {
|
||||
return (
|
||||
<>
|
||||
<ConditionallyRender
|
||||
condition={isBilling && Boolean(instanceStatus)}
|
||||
condition={Boolean(instanceStatus)}
|
||||
show={() => (
|
||||
<>
|
||||
<InstanceStatusBarMemo
|
||||
|
@ -95,6 +95,20 @@ test('InstanceStatusBar should warn when the trial has expired', async () => {
|
||||
expect(await screen.findByTestId(INSTANCE_STATUS_BAR_ID)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('InstanceStatusBar should warn when the trial has expired for enterprise', async () => {
|
||||
render(
|
||||
<InstanceStatusBar
|
||||
instanceStatus={{
|
||||
plan: InstancePlan.ENTERPRISE,
|
||||
state: InstanceState.EXPIRED,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
expect(screen.getByTestId(INSTANCE_STATUS_BAR_ID)).toBeInTheDocument();
|
||||
expect(await screen.findByTestId(INSTANCE_STATUS_BAR_ID)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('InstanceStatusBar should warn when the trial has churned', async () => {
|
||||
render(
|
||||
<InstanceStatusBar
|
||||
|
@ -80,6 +80,46 @@ exports[`InstanceStatusBar should warn when the trial has expired 1`] = `
|
||||
</aside>
|
||||
`;
|
||||
|
||||
exports[`InstanceStatusBar should warn when the trial has expired for enterprise 1`] = `
|
||||
<aside
|
||||
class="css-163g6kh"
|
||||
data-testid="INSTANCE_STATUS_BAR_ID"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-prk1jy-MuiSvgIcon-root"
|
||||
data-testid="WarningAmberIcon"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M12 5.99 19.53 19H4.47L12 5.99M12 2 1 21h22L12 2z"
|
||||
/>
|
||||
<path
|
||||
d="M13 16h-2v2h2zm0-6h-2v5h2z"
|
||||
/>
|
||||
</svg>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-rviqjc-MuiTypography-root"
|
||||
>
|
||||
<strong>
|
||||
Warning!
|
||||
</strong>
|
||||
Your free
|
||||
Enterprise
|
||||
trial has expired.
|
||||
<strong>
|
||||
Upgrade trial
|
||||
</strong>
|
||||
otherwise your
|
||||
|
||||
<strong>
|
||||
account will be deleted.
|
||||
</strong>
|
||||
</p>
|
||||
</aside>
|
||||
`;
|
||||
|
||||
exports[`InstanceStatusBar should warn when the trial is about to expire 1`] = `
|
||||
<aside
|
||||
class="css-f22srx"
|
||||
|
@ -20,5 +20,6 @@ export enum InstancePlan {
|
||||
PRO = 'Pro',
|
||||
COMPANY = 'Company',
|
||||
TEAM = 'Team',
|
||||
ENTERPRISE = 'Enterprise',
|
||||
UNKNOWN = 'Unknown',
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user