Skip to content

Commit 4136362

Browse files
fix(billing): Check self serve partner value in hasBillingInfo (#104066)
closes https://linear.app/getsentry/issue/BIL-1823/user-unable-to-upgrade-due-to-vercel-plan-issues
1 parent 6d72cfa commit 4136362

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

static/gsApp/views/amCheckout/components/cart.spec.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ describe('Cart', () => {
457457
},
458458
name: 'partner',
459459
},
460+
paymentSource: null,
460461
});
461462

462463
render(
@@ -471,7 +472,9 @@ describe('Cart', () => {
471472
);
472473

473474
// wait for preview to be loaded
474-
await screen.findByRole('button', {name: 'Confirm and pay'});
475+
await waitFor(() =>
476+
expect(screen.getByRole('button', {name: 'Confirm and pay'})).toBeEnabled()
477+
);
475478
screen.getByText(/you will be billed by Partner/);
476479
});
477480

static/gsApp/views/amCheckout/utils.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,10 @@ export function hasBillingInfo(
899899
subscription: Subscription,
900900
isComplete: boolean
901901
) {
902+
if (subscription.isSelfServePartner) {
903+
return true;
904+
}
905+
902906
if (isComplete) {
903907
return !!subscription.paymentSource && hasSomeBillingDetails(billingDetails);
904908
}

0 commit comments

Comments
 (0)