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

Fix/order summary sidebar css #6231

Merged
merged 3 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.wc-block-cart__submit-button {
width: 100%;
margin: 0;
box-sizing: border-box;
}

.wc-block-cart {
Expand Down
17 changes: 17 additions & 0 deletions assets/js/blocks/cart/test/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import OrderSummaryBlock from '../inner-blocks/cart-order-summary-block/frontend
import ExpressPaymentBlock from '../inner-blocks/cart-express-payment-block/block';
import ProceedToCheckoutBlock from '../inner-blocks/proceed-to-checkout-block/block';
import AcceptedPaymentMethodsIcons from '../inner-blocks/cart-accepted-payment-methods-block/block';
import OrderSummaryHeadingBlock from '../inner-blocks/cart-order-summary-heading/frontend';
import OrderSummarySubtotalBlock from '../inner-blocks/cart-order-summary-subtotal/frontend';
import OrderSummaryShippingBlock from '../inner-blocks/cart-order-summary-shipping/frontend';
import OrderSummaryTaxesBlock from '../inner-blocks/cart-order-summary-taxes/frontend';
Expand All @@ -49,6 +50,7 @@ const CartBlock = ( {
</ItemsBlock>
<TotalsBlock>
<OrderSummaryBlock>
<OrderSummaryHeadingBlock />
<OrderSummarySubtotalBlock />
<OrderSummaryShippingBlock
isShippingCalculatorEnabled={
Expand Down Expand Up @@ -93,6 +95,7 @@ describe( 'Testing cart', () => {
it( 'renders cart if there are items in the cart', async () => {
render( <CartBlock /> );
await waitFor( () => expect( fetchMock ).toHaveBeenCalled() );

expect(
screen.getByText( /Proceed to Checkout/i )
).toBeInTheDocument();
Expand All @@ -110,6 +113,20 @@ describe( 'Testing cart', () => {
expect( screen.getByText( /Tax/i ) ).toBeInTheDocument();
} );

it( 'Contains a Order summary header', async () => {
render( <CartBlock /> );

await waitFor( () => expect( fetchMock ).toHaveBeenCalled() );
expect( screen.getByText( /Cart totals/i ) ).toBeInTheDocument();
} );

it( 'Contains a Order summary Subtotal section', async () => {
render( <CartBlock /> );

await waitFor( () => expect( fetchMock ).toHaveBeenCalled() );
expect( screen.getByText( /Subtotal/i ) ).toBeInTheDocument();
} );

it( 'Shows individual tax lines if the store is set to do so', async () => {
allSettings.displayCartPricesIncludingTax = false;
allSettings.displayItemizedTaxes = true;
Expand Down
1 change: 1 addition & 0 deletions packages/checkout/components/totals/item/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
display: flex;
flex-wrap: wrap;
width: 100%;
box-sizing: border-box;
}

.wc-block-components-totals-item__label {
Expand Down