Skip to content

Commit 63c5dc2

Browse files
authored
feat(billing): remove override check when starting DS trial (#89659)
1 parent ed93acf commit 63c5dc2

File tree

3 files changed

+4
-36
lines changed

3 files changed

+4
-36
lines changed

static/gsAdmin/components/trialSubscriptionAction.spec.tsx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ describe('TrialSubscriptionAction', function () {
116116
isFree: true,
117117
})}
118118
startEnterpriseTrial
119-
canUseTrialOverride
120119
{...deps}
121120
/>
122121
),
@@ -138,32 +137,6 @@ describe('TrialSubscriptionAction', function () {
138137
});
139138
});
140139

141-
it('cannot use trialPlanOverride if disabled', async function () {
142-
jest.mock('sentry/components/core/alert');
143-
144-
openAdminConfirmModal({
145-
onConfirm,
146-
renderModalSpecificContent: deps => (
147-
<TrialSubscriptionAction
148-
subscription={SubscriptionFixture({
149-
organization,
150-
plan: 'am3_f',
151-
isFree: true,
152-
})}
153-
startEnterpriseTrial
154-
{...deps}
155-
/>
156-
),
157-
});
158-
159-
renderGlobalModal();
160-
161-
await userEvent.click(screen.getByTestId('trial-plan-tier-choices'));
162-
const trialTierInputs = within(screen.getByRole('dialog')).getAllByRole('textbox');
163-
await userEvent.click(trialTierInputs[0]!);
164-
expect(screen.queryByText('am3 with Dynamic Sampling')).not.toBeInTheDocument();
165-
});
166-
167140
it('displays correct trial end date when starting trial', async function () {
168141
jest.mock('sentry/components/core/alert');
169142

static/gsAdmin/components/trialSubscriptionAction.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {PlanTier} from 'getsentry/types';
1414

1515
type Props = AdminConfirmRenderProps & {
1616
subscription: Subscription;
17-
canUseTrialOverride?: boolean;
1817
startEnterpriseTrial?: boolean;
1918
};
2019

@@ -76,7 +75,7 @@ class TrialSubscriptionAction extends Component<Props, State> {
7675
}
7776

7877
render() {
79-
const {subscription, startEnterpriseTrial, canUseTrialOverride = false} = this.props;
78+
const {subscription, startEnterpriseTrial} = this.props;
8079
const {trialDays, trialTier, trialPlanOverride} = this.state;
8180
const AM3_ENTERPRISE_TRIAL_PLAN = 'am3_t_ent_ds';
8281

@@ -91,11 +90,8 @@ class TrialSubscriptionAction extends Component<Props, State> {
9190

9291
const tierChoices: Array<[string | PlanTier, string | PlanTier]> = [];
9392

94-
// TODO(DS Spans): remove canUseTrialOverride once we've launched
95-
if (canUseTrialOverride) {
96-
// TODO(DS Spans): remove this if we ever put DS on the regular AM3 enterprise trial
97-
tierChoices.push([AM3_ENTERPRISE_TRIAL_PLAN, 'am3 with Dynamic Sampling']);
98-
}
93+
// TODO(DS Spans): remove this if we ever put DS on the regular AM3 enterprise trial
94+
tierChoices.push([AM3_ENTERPRISE_TRIAL_PLAN, 'am3 with Dynamic Sampling']);
9995

10096
tierChoices.push(
10197
[PlanTier.AM3, PlanTier.AM3],

static/gsAdmin/views/customerDetails.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,6 @@ class CustomerDetails extends DeprecatedAsyncComponent<Props, State> {
527527
<TrialSubscriptionAction
528528
subscription={data}
529529
startEnterpriseTrial
530-
canUseTrialOverride={hasAdminTestFeatures}
531530
{...deps}
532531
/>
533532
),
@@ -651,7 +650,7 @@ class CustomerDetails extends DeprecatedAsyncComponent<Props, State> {
651650
orgId,
652651
subscription: data,
653652
billingConfig,
654-
canProvisionDsPlan: hasAdminTestFeatures,
653+
canProvisionDsPlan: true,
655654
onSuccess: () => this.reloadData(),
656655
}),
657656
},

0 commit comments

Comments
 (0)