Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Simplify orderSummary check
Browse files Browse the repository at this point in the history
  • Loading branch information
alexflorisca committed Apr 5, 2022
1 parent b4f8905 commit 353ed3a
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions tests/e2e/specs/shopper/cart-checkout-translations.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,9 @@ describe( 'Shopper → Cart → Can view translated cart & checkout blocks', ()
'.wp-block-woocommerce-cart-order-summary-block'
);

const orderHeading = await page.waitForSelector(
'.wc-block-components-title'
);
const orderSummarySubtotal = await page.waitForSelector(
'.wc-block-components-totals-item__label'
);
const orderSummaryCoupon = await page.waitForSelector(
'.wc-block-components-totals-coupon'
);

await expect( orderHeading ).toMatch( 'Total panier' );
await expect( orderSummarySubtotal ).toMatch( 'Sous-total' );
await expect( orderSummaryCoupon ).toMatch( 'Coupon code' );
await expect( orderSummary ).toMatch( 'Total panier' );
await expect( orderSummary ).toMatch( 'Sous-total' );
await expect( orderSummary ).toMatch( 'Coupon code' );
} );

it( 'should be able to view translated Checkout block', async () => {
Expand All @@ -100,8 +90,7 @@ describe( 'Shopper → Cart → Can view translated cart & checkout blocks', ()
'#shipping-option .wc-block-components-checkout-step__title'
);
await expect( shippingOptionsHeading ).toMatch(
'Options de livraison',
{ timeout: 60000 }
'Options de livraison'
);

const paymentMethodHeading = await page.$(
Expand Down

0 comments on commit 353ed3a

Please sign in to comment.