Skip to content

Commit 8f29cb4

Browse files
committed
replace drawer object with the name of the component
1 parent 748f635 commit 8f29cb4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/react/src/components/__tests__/CheckoutButton.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe('CheckoutButton', () => {
101101
planPeriod: 'month' as const,
102102
onSubscriptionComplete: vi.fn(),
103103
newSubscriptionRedirectUrl: '/success',
104-
planDetailsProps: {
104+
checkoutProps: {
105105
appearance: {} as Theme,
106106
onClose: vi.fn(),
107107
},
@@ -114,7 +114,7 @@ describe('CheckoutButton', () => {
114114
await waitFor(() => {
115115
expect(mockOpenCheckout).toHaveBeenCalledWith(
116116
expect.objectContaining({
117-
...props.planDetailsProps,
117+
...props.checkoutProps,
118118
planId: props.planId,
119119
onSubscriptionComplete: props.onSubscriptionComplete,
120120
newSubscriptionRedirectUrl: props.newSubscriptionRedirectUrl,
@@ -180,7 +180,7 @@ describe('CheckoutButton', () => {
180180
it('handles portal configuration correctly', async () => {
181181
const portalProps = {
182182
planId: 'test_plan',
183-
planDetailsProps: {
183+
checkoutProps: {
184184
portalId: 'custom-portal',
185185
portalRoot: document.createElement('div'),
186186
},
@@ -191,7 +191,7 @@ describe('CheckoutButton', () => {
191191
await userEvent.click(screen.getByText('Checkout'));
192192
await waitFor(() => {
193193
expect(mockOpenCheckout).toHaveBeenCalledWith(
194-
expect.objectContaining({ ...portalProps.planDetailsProps, planId: portalProps.planId }),
194+
expect.objectContaining({ ...portalProps.checkoutProps, planId: portalProps.planId }),
195195
);
196196
});
197197
});

packages/react/src/components/__tests__/SubscriptionDetailsButton.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe('SubscriptionDetailsButton', () => {
121121
const props = {
122122
for: 'user' as const,
123123
onSubscriptionCancel,
124-
planDetailsProps: {
124+
subscriptionDetailsProps: {
125125
appearance: {} as Theme,
126126
},
127127
};
@@ -133,7 +133,7 @@ describe('SubscriptionDetailsButton', () => {
133133
await waitFor(() => {
134134
expect(mockOpenSubscriptionDetails).toHaveBeenCalledWith(
135135
expect.objectContaining({
136-
...props.planDetailsProps,
136+
...props.subscriptionDetailsProps,
137137
for: props.for,
138138
onSubscriptionCancel: props.onSubscriptionCancel,
139139
}),
@@ -183,7 +183,7 @@ describe('SubscriptionDetailsButton', () => {
183183

184184
it('handles portal configuration correctly', async () => {
185185
const portalProps = {
186-
planDetailsProps: {
186+
subscriptionDetailsProps: {
187187
portalId: 'custom-portal',
188188
portalRoot: document.createElement('div'),
189189
},
@@ -196,7 +196,7 @@ describe('SubscriptionDetailsButton', () => {
196196
await waitFor(() => {
197197
expect(mockOpenSubscriptionDetails).toHaveBeenCalledWith(
198198
expect.objectContaining({
199-
...portalProps.planDetailsProps,
199+
...portalProps.subscriptionDetailsProps,
200200
}),
201201
);
202202
});

0 commit comments

Comments
 (0)