@@ -89,11 +89,11 @@ describe('CancelSubscriptionPanel', () => {
8989 < CancelSubscriptionPanel { ...props } />
9090 ) ;
9191
92- const planPrice = formatPlanPricing (
92+ const planPrice = formatPriceAmount (
9393 props . invoice . total ,
9494 props . plan . currency ,
95- props . plan . interval ,
96- props . plan . interval_count
95+ false ,
96+ 0
9797 ) ;
9898 const nextBillDate = getLocalizedDateString (
9999 props . subsequentInvoice . period_start ,
@@ -305,17 +305,17 @@ describe('CancelSubscriptionPanel', () => {
305305 />
306306 </ LocalizationProvider >
307307 ) ;
308- expect ( queryByText ( '$20.00 fooly ' ) ) . toBeInTheDocument ( ) ;
308+ expect ( queryByText ( '$20.00' ) ) . toBeInTheDocument ( ) ;
309309 expect ( queryByText ( 'quuz 13/09/2019' ) ) . toBeInTheDocument ( ) ;
310310 expect ( queryByText ( 'blee' ) ) . toBeInTheDocument ( ) ;
311311 } ) ;
312312
313313 it ( 'displays the correct pricing info with interval > 1' , ( ) => {
314314 const bundle = new FluentBundle ( 'gd' , { useIsolating : false } ) ;
315315 [
316- `price-details-no-tax-day = { $intervalCount ->
317- [one] { $priceAmount } fooly
318- *[other] { $priceAmount } barly { $intervalCount } 24hrs
316+ `price-details-no-tax = { $intervalCount ->
317+ [one] { $priceAmount }
318+ *[other] { $priceAmount }
319319 }` ,
320320 ] . forEach ( ( x ) => bundle . addResource ( new FluentResource ( x ) ) ) ;
321321 const plan = { ...findMockPlan ( 'plan_daily' ) , interval_count : 8 } ;
@@ -325,15 +325,15 @@ describe('CancelSubscriptionPanel', () => {
325325 < CancelSubscriptionPanel { ...baseProps } plan = { plan } />
326326 </ LocalizationProvider >
327327 ) ;
328- expect ( queryByText ( '$20.00 barly 8 24hrs ' ) ) . toBeInTheDocument ( ) ;
328+ expect ( queryByText ( '$20.00' ) ) . toBeInTheDocument ( ) ;
329329 } ) ;
330330
331331 it ( 'displays the correct pricing and exclusive tax info with interval of 1' , ( ) => {
332332 const bundle = new FluentBundle ( 'gd' , { useIsolating : false } ) ;
333333 [
334- `price-details-tax-day = { $intervalCount ->
335- [one] { $priceAmount } + { $taxAmount } tax fooly
336- *[other] { $priceAmount } + { $taxAmount } tax barly { $intervalCount } 24hrs
334+ `price-details-tax = { $intervalCount ->
335+ [one] { $priceAmount } + { $taxAmount } tax
336+ *[other] { $priceAmount } + { $taxAmount } tax
337337 }` ,
338338 'payment-cancel-btn = blee' ,
339339 `price-details-tax = { $priceAmount } + { $taxAmount } taxes` ,
@@ -354,7 +354,7 @@ describe('CancelSubscriptionPanel', () => {
354354 </ LocalizationProvider >
355355 ) ;
356356 expect ( queryByTestId ( 'price-details-standalone' ) ) . toHaveTextContent (
357- '$20.00 + $3.00 tax fooly '
357+ '$20.00 + $3.00 tax'
358358 ) ;
359359 expect ( queryByTestId ( 'sub-next-bill' ) ) . toHaveTextContent (
360360 'Next bill of $5.00 + $1.23 taxes is due 13/09/2019'
@@ -365,9 +365,9 @@ describe('CancelSubscriptionPanel', () => {
365365 it ( 'displays the correct pricing and exclusive tax info with interval > 1' , ( ) => {
366366 const bundle = new FluentBundle ( 'gd' , { useIsolating : false } ) ;
367367 [
368- `price-details-tax-day = { $intervalCount ->
369- [one] { $priceAmount } + { $taxAmount } tax fooly
370- *[other] { $priceAmount } + { $taxAmount } tax barly { $intervalCount } 24hrs
368+ `price-details-tax = { $intervalCount ->
369+ [one] { $priceAmount } + { $taxAmount } tax
370+ *[other] { $priceAmount } + { $taxAmount } tax
371371 }` ,
372372 `price-details-tax = { $priceAmount } + { $taxAmount } taxes` ,
373373 `sub-next-bill-tax-1 = Next bill of { $priceAmount } + { $taxAmount } taxes is due { $date }` ,
@@ -385,7 +385,7 @@ describe('CancelSubscriptionPanel', () => {
385385 </ LocalizationProvider >
386386 ) ;
387387 expect ( queryByTestId ( 'price-details-standalone' ) ) . toHaveTextContent (
388- '$20.00 + $3.00 tax barly 8 24hrs '
388+ '$20.00 + $3.00 tax'
389389 ) ;
390390 expect ( queryByTestId ( 'sub-next-bill' ) ) . toHaveTextContent (
391391 'Next bill of $5.00 + $1.23 taxes is due 14/08/2019'
@@ -395,9 +395,9 @@ describe('CancelSubscriptionPanel', () => {
395395 it ( 'displays the correct pricing and exclusive tax with discount info with interval > 1' , ( ) => {
396396 const bundle = new FluentBundle ( 'gd' , { useIsolating : false } ) ;
397397 [
398- `price-details-tax-day = { $intervalCount ->
399- [one] { $priceAmount } + { $taxAmount } tax fooly
400- *[other] { $priceAmount } + { $taxAmount } tax barly { $intervalCount } 24hrs
398+ `price-details-tax = { $intervalCount ->
399+ [one] { $priceAmount } + { $taxAmount } tax
400+ *[other] { $priceAmount } + { $taxAmount } tax
401401 }` ,
402402 `sub-next-bill-tax-1 = Next bill of { $priceAmount } + { $taxAmount } taxes is due { $date }` ,
403403 ] . forEach ( ( x ) => bundle . addResource ( new FluentResource ( x ) ) ) ;
@@ -414,7 +414,7 @@ describe('CancelSubscriptionPanel', () => {
414414 </ LocalizationProvider >
415415 ) ;
416416 expect ( queryByTestId ( 'price-details-standalone' ) ) . toHaveTextContent (
417- '$19.50 + $3.00 tax barly 8 24hrs '
417+ '$19.50 + $3.00 tax'
418418 ) ;
419419 expect ( queryByTestId ( 'sub-next-bill' ) ) . toHaveTextContent (
420420 'Next bill of $4.50 + $1.23 taxes is due 14/08/2019'
@@ -424,9 +424,9 @@ describe('CancelSubscriptionPanel', () => {
424424 it ( 'displays the correct pricing and hides tax for zero tax amount' , ( ) => {
425425 const bundle = new FluentBundle ( 'gd' , { useIsolating : false } ) ;
426426 [
427- `price-details-tax-day = { $intervalCount ->
428- [one] { $priceAmount } + { $taxAmount } tax fooly
429- *[other] { $priceAmount } + { $taxAmount } tax barly { $intervalCount } 24hrs
427+ `price-details-tax = { $intervalCount ->
428+ [one] { $priceAmount } + { $taxAmount } tax
429+ *[other] { $priceAmount } + { $taxAmount } tax
430430 }` ,
431431 'payment-cancel-btn = blee' ,
432432 `price-details-tax = { $priceAmount } + { $taxAmount } taxes` ,
@@ -448,7 +448,7 @@ describe('CancelSubscriptionPanel', () => {
448448 </ LocalizationProvider >
449449 ) ;
450450 expect ( queryByTestId ( 'price-details-standalone' ) ) . toHaveTextContent (
451- '$20.00 daily '
451+ '$20.00'
452452 ) ;
453453 expect ( queryByTestId ( 'sub-next-bill' ) ) . toHaveTextContent (
454454 'Next bill of $5.00 prices is due 13/09/2019'
@@ -459,9 +459,9 @@ describe('CancelSubscriptionPanel', () => {
459459 it ( 'displays the correct pricing and inclusive tax info with interval of 1' , ( ) => {
460460 const bundle = new FluentBundle ( 'gd' , { useIsolating : false } ) ;
461461 [
462- `price-details-no-tax-day = { $intervalCount ->
463- [one] { $priceAmount } fooly
464- *[other] { $priceAmount } barly { $intervalCount } 24hrs
462+ `price-details-no-tax = { $intervalCount ->
463+ [one] { $priceAmount }
464+ *[other] { $priceAmount }
465465 }` ,
466466 'payment-cancel-btn = blee' ,
467467 `sub-next-bill-no-tax-1 = Next bill of { $priceAmount } prices is due { $date }` ,
@@ -481,7 +481,7 @@ describe('CancelSubscriptionPanel', () => {
481481 </ LocalizationProvider >
482482 ) ;
483483 expect ( queryByTestId ( 'price-details-standalone' ) ) . toHaveTextContent (
484- '$20.00 fooly '
484+ '$20.00'
485485 ) ;
486486 expect ( queryByTestId ( 'sub-next-bill' ) ) . toHaveTextContent (
487487 'Next bill of $5.00 prices is due 13/09/2019'
@@ -492,9 +492,9 @@ describe('CancelSubscriptionPanel', () => {
492492 it ( 'displays the correct pricing and inclusive tax info with interval > 1' , ( ) => {
493493 const bundle = new FluentBundle ( 'gd' , { useIsolating : false } ) ;
494494 [
495- `price-details-no-tax-day = { $intervalCount ->
496- [one] { $priceAmount } fooly
497- *[other] { $priceAmount } barly { $intervalCount } 24hrs
495+ `price-details-no-tax = { $intervalCount ->
496+ [one] { $priceAmount }
497+ *[other] { $priceAmount }
498498 }` ,
499499 `sub-next-bill-no-tax-1 = Next bill of { $priceAmount } prices is due { $date }` ,
500500 ] . forEach ( ( x ) => bundle . addResource ( new FluentResource ( x ) ) ) ;
@@ -511,7 +511,7 @@ describe('CancelSubscriptionPanel', () => {
511511 </ LocalizationProvider >
512512 ) ;
513513 expect ( queryByTestId ( 'price-details-standalone' ) ) . toHaveTextContent (
514- '$20.00 barly 8 24hrs '
514+ '$20.00'
515515 ) ;
516516 expect ( queryByTestId ( 'sub-next-bill' ) ) . toHaveTextContent (
517517 'Next bill of $5.00 prices is due 14/08/2019'
@@ -521,9 +521,9 @@ describe('CancelSubscriptionPanel', () => {
521521 it ( 'displays the correct pricing and inclusive tax with discount info with interval > 1' , ( ) => {
522522 const bundle = new FluentBundle ( 'gd' , { useIsolating : false } ) ;
523523 [
524- `price-details-no-tax-day = { $intervalCount ->
525- [one] { $priceAmount } fooly
526- *[other] { $priceAmount } barly { $intervalCount } 24hrs
524+ `price-details-no-tax = { $intervalCount ->
525+ [one] { $priceAmount }
526+ *[other] { $priceAmount }
527527 }` ,
528528 `sub-next-bill-no-tax-1 = Next bill of { $priceAmount } prices is due { $date }` ,
529529 ] . forEach ( ( x ) => bundle . addResource ( new FluentResource ( x ) ) ) ;
@@ -540,7 +540,7 @@ describe('CancelSubscriptionPanel', () => {
540540 </ LocalizationProvider >
541541 ) ;
542542 expect ( queryByTestId ( 'price-details-standalone' ) ) . toHaveTextContent (
543- '$19.50 barly 8 24hrs '
543+ '$19.50'
544544 ) ;
545545 expect ( queryByTestId ( 'sub-next-bill' ) ) . toHaveTextContent (
546546 'Next bill of $4.50 prices is due 14/08/2019'
0 commit comments