@@ -10,6 +10,7 @@ describe('SubscriptionDetails', () => {
1010 it ( 'Displays spinner when init loading' , async ( ) => {
1111 const { wrapper } = await createFixtures ( f => {
1212 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
13+ f . withBilling ( ) ;
1314 } ) ;
1415
1516 const { baseElement } = render (
@@ -31,6 +32,7 @@ describe('SubscriptionDetails', () => {
3132 it ( 'single active monthly subscription' , async ( ) => {
3233 const { wrapper, fixtures } = await createFixtures ( f => {
3334 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
35+ f . withBilling ( ) ;
3436 } ) ;
3537
3638 fixtures . clerk . billing . getSubscription . mockResolvedValue ( {
@@ -134,6 +136,7 @@ describe('SubscriptionDetails', () => {
134136 it ( 'single active annual subscription' , async ( ) => {
135137 const { wrapper, fixtures } = await createFixtures ( f => {
136138 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
139+ f . withBilling ( ) ;
137140 } ) ;
138141
139142 fixtures . clerk . billing . getSubscription . mockResolvedValue ( {
@@ -237,6 +240,7 @@ describe('SubscriptionDetails', () => {
237240 it ( 'active free subscription' , async ( ) => {
238241 const { wrapper, fixtures } = await createFixtures ( f => {
239242 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
243+ f . withBilling ( ) ;
240244 } ) ;
241245
242246 fixtures . clerk . billing . getSubscription . mockResolvedValue ( {
@@ -319,6 +323,7 @@ describe('SubscriptionDetails', () => {
319323 it ( 'one active annual and one upcoming monthly subscription' , async ( ) => {
320324 const { wrapper, fixtures } = await createFixtures ( f => {
321325 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
326+ f . withBilling ( ) ;
322327 } ) ;
323328
324329 const planAnnual = {
@@ -478,6 +483,7 @@ describe('SubscriptionDetails', () => {
478483 it ( 'one active and one upcoming FREE subscription' , async ( ) => {
479484 const { wrapper, fixtures } = await createFixtures ( f => {
480485 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
486+ f . withBilling ( ) ;
481487 } ) ;
482488
483489 const planMonthly = {
@@ -614,6 +620,7 @@ describe('SubscriptionDetails', () => {
614620 it ( 'allows cancelling a subscription of a monthly plan' , async ( ) => {
615621 const { wrapper, fixtures } = await createFixtures ( f => {
616622 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
623+ f . withBilling ( ) ;
617624 } ) ;
618625
619626 const cancelSubscriptionMock = jest . fn ( ) . mockResolvedValue ( { } ) ;
@@ -718,6 +725,7 @@ describe('SubscriptionDetails', () => {
718725 it ( 'calls resubscribe when the user clicks Resubscribe for a canceled subscription' , async ( ) => {
719726 const { wrapper, fixtures } = await createFixtures ( f => {
720727 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
728+ f . withBilling ( ) ;
721729 } ) ;
722730
723731 const plan = {
@@ -820,6 +828,7 @@ describe('SubscriptionDetails', () => {
820828 it ( 'calls switchToMonthly when the user clicks Switch to monthly for an annual subscription' , async ( ) => {
821829 const { wrapper, fixtures } = await createFixtures ( f => {
822830 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
831+ f . withBilling ( ) ;
823832 } ) ;
824833
825834 const plan = {
@@ -925,6 +934,7 @@ describe('SubscriptionDetails', () => {
925934 it ( 'past due subscription shows correct status and disables actions' , async ( ) => {
926935 const { wrapper, fixtures } = await createFixtures ( f => {
927936 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
937+ f . withBilling ( ) ;
928938 } ) ;
929939
930940 const plan = {
@@ -1017,6 +1027,7 @@ describe('SubscriptionDetails', () => {
10171027 it ( 'active free trial subscription shows correct labels and behavior' , async ( ) => {
10181028 const { wrapper, fixtures } = await createFixtures ( f => {
10191029 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
1030+ f . withBilling ( ) ;
10201031 } ) ;
10211032
10221033 fixtures . clerk . billing . getSubscription . mockResolvedValue ( {
@@ -1125,6 +1136,7 @@ describe('SubscriptionDetails', () => {
11251136 it ( 'allows cancelling a free trial with specific dialog text' , async ( ) => {
11261137 const { wrapper, fixtures } = await createFixtures ( f => {
11271138 f . withUser ( { email_addresses : [ 'test@clerk.com' ] } ) ;
1139+ f . withBilling ( ) ;
11281140 } ) ;
11291141
11301142 const cancelSubscriptionMock = jest . fn ( ) . mockResolvedValue ( { } ) ;
0 commit comments