File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
packages/ui/src/components/Checkout/__tests__ Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -404,10 +404,16 @@ describe('Checkout', () => {
404404 expect ( getByRole ( 'heading' , { name : 'Checkout' } ) ) . toBeVisible ( ) ;
405405 } ) ;
406406
407- expect ( getByText ( 'Credit for the remainder of your current subscription.' ) ) . toBeVisible ( ) ;
408- expect ( getByText ( 'Credit from account balance.' ) ) . toBeVisible ( ) ;
409- expect ( getByText ( '- $5.00' ) ) . toBeVisible ( ) ;
410- expect ( getByText ( '- $10.00' ) ) . toBeVisible ( ) ;
407+ const prorationCreditRow = getByText ( 'Credit for the remainder of your current subscription.' ) . closest (
408+ '.cl-lineItemsGroup' ,
409+ ) ;
410+ const accountCreditRow = getByText ( 'Credit from account balance.' ) . closest ( '.cl-lineItemsGroup' ) ;
411+
412+ expect ( prorationCreditRow ) . toBeInTheDocument ( ) ;
413+ expect ( accountCreditRow ) . toBeInTheDocument ( ) ;
414+
415+ expect ( prorationCreditRow ) . toHaveTextContent ( '- $5.00' ) ;
416+ expect ( accountCreditRow ) . toHaveTextContent ( '- $10.00' ) ;
411417 } ) ;
412418
413419 it ( 'renders free trial details during confirmation stage' , async ( ) => {
You can’t perform that action at this time.
0 commit comments