Fix broken CSS classes and update JS unit snapshots (#45732)

* Fix broken CSS classes and update JS unit snapshots

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Niels Lange 2024-03-20 17:42:05 +07:00 committed by GitHub
parent 49b92070cc
commit fa49848cf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 50 additions and 22 deletions

View File

@ -85,7 +85,7 @@ const TotalsFooterItem = ( {
const priceComponent = ( const priceComponent = (
<FormattedMonetaryAmount <FormattedMonetaryAmount
className="wc-block-components-totals-item__value" className="wc-block-components-totals-footer-item-tax-value"
currency={ currency } currency={ currency }
value={ parseInt( totalPrice, 10 ) } value={ parseInt( totalPrice, 10 ) }
/> />

View File

@ -10,11 +10,15 @@ exports[`TotalsFooterItem Does not show the "including %s of tax" line if tax is
> >
Total Total
</span> </span>
<span <div
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value" class="wc-block-components-totals-item__value"
> >
£85.00 <span
</span> class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div <div
class="wc-block-components-totals-item__description" class="wc-block-components-totals-item__description"
/> />
@ -32,11 +36,15 @@ exports[`TotalsFooterItem Does not show the "including %s of tax" line if tax is
> >
Total Total
</span> </span>
<span <div
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value" class="wc-block-components-totals-item__value"
> >
£85.00 <span
</span> class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div <div
class="wc-block-components-totals-item__description" class="wc-block-components-totals-item__description"
/> />
@ -54,11 +62,15 @@ exports[`TotalsFooterItem Shows the "including %s TAX LABEL" line with single ta
> >
Total Total
</span> </span>
<span <div
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value" class="wc-block-components-totals-item__value"
> >
£85.00 <span
</span> class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div <div
class="wc-block-components-totals-item__description" class="wc-block-components-totals-item__description"
> >
@ -82,11 +94,15 @@ exports[`TotalsFooterItem Shows the "including %s TAX LABELS" line with multiple
> >
Total Total
</span> </span>
<span <div
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value" class="wc-block-components-totals-item__value"
> >
£85.00 <span
</span> class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div <div
class="wc-block-components-totals-item__description" class="wc-block-components-totals-item__description"
> >
@ -110,11 +126,15 @@ exports[`TotalsFooterItem Shows the "including %s of tax" line if tax is greater
> >
Total Total
</span> </span>
<span <div
class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-item__value" class="wc-block-components-totals-item__value"
> >
£85.00 <span
</span> class="wc-block-formatted-money-amount wc-block-components-formatted-money-amount wc-block-components-totals-footer-item-tax-value"
>
£85.00
</span>
</div>
<div <div
class="wc-block-components-totals-item__description" class="wc-block-components-totals-item__description"
> >

View File

@ -26,7 +26,11 @@ const TotalsItemValue = ( {
currency, currency,
}: Partial< TotalsItemProps > ): ReactElement | null => { }: Partial< TotalsItemProps > ): ReactElement | null => {
if ( isValidElement( value ) ) { if ( isValidElement( value ) ) {
return <>{ value }</>; return (
<div className="wc-block-components-totals-item__value">
{ value }
</div>
);
} }
return Number.isFinite( value ) ? ( return Number.isFinite( value ) ? (

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Fix broken CSS styles of the `totalValue` filter.