Skip to content

Commit 970a334

Browse files
Merge pull request #2554 from SalesforceCommerceCloud/t/1c-shark/W-18597966/revertBonusLabelChange
@W-18597966 - Revert Bonus Label Change
2 parents 0ae61e0 + 3b3d278 commit 970a334

File tree

8 files changed

+0
-79
lines changed

8 files changed

+0
-79
lines changed

packages/template-retail-react-app/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
- Improved the layout of product tiles in product scroll and product list [#2446](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2446)
44
- Updated 6 new languagues [#2495](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2495)
5-
- Show Bonus Product Label on OrderSummary component [#2524](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2524)
65

76
## v6.1.0 (May 22, 2025)
87

packages/template-retail-react-app/app/components/item-variant/item-attributes.jsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const ItemAttributes = ({includeQuantity, currency, ...props}) => {
2727
const promotionIds = variant.priceAdjustments?.map((adj) => adj.promotionId) ?? []
2828
const intl = useIntl()
2929

30-
const isBonusProduct = variant?.bonusProductLineItem
3130
// Fetch all the promotions given by price adjustments. We display this info in
3231
// the promotion info popover when applicable.
3332
const {data: res} = usePromotions(
@@ -92,15 +91,6 @@ const ItemAttributes = ({includeQuantity, currency, ...props}) => {
9291

9392
return (
9493
<Stack spacing={1.5} flex={1} {...props}>
95-
{isBonusProduct && (
96-
<Text lineHeight={1} color="black.600" fontSize="sm">
97-
<FormattedMessage
98-
defaultMessage="Bonus Product"
99-
id="item_attributes.label.is_bonus_product"
100-
/>
101-
</Text>
102-
)}
103-
10494
{variationValues &&
10595
Object.keys(variationValues).map((key) => (
10696
<Text

packages/template-retail-react-app/app/components/item-variant/item-attributes.test.js

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -73,39 +73,3 @@ test('component renders product bundles without variant data', async () => {
7373
})
7474
})
7575
})
76-
77-
test('renders Bonus Product when isBonusProduct is true', async () => {
78-
const mockVariantWithBonusProduct = {
79-
...mockBundledProductItemsVariant,
80-
bonusProductLineItem: true // Simulate the bonus product flag
81-
}
82-
83-
renderWithProviders(<MockedComponent variant={mockVariantWithBonusProduct} />)
84-
85-
await waitFor(() => {
86-
expect(screen.getByText(/Bonus Product/i)).toBeInTheDocument()
87-
})
88-
})
89-
90-
test('does not render Bonus Product when isBonusProduct is false', async () => {
91-
const mockVariantWithoutBonusProduct = {
92-
...mockBundledProductItemsVariant,
93-
bonusProductLineItem: false // Simulate the absence of the bonus product flag
94-
}
95-
96-
renderWithProviders(<MockedComponent variant={mockVariantWithoutBonusProduct} />)
97-
98-
await waitFor(() => {
99-
expect(screen.queryByText(/Bonus Product/i)).not.toBeInTheDocument()
100-
})
101-
})
102-
103-
test('does not render Bonus Product when bonusProductLineItem is undefined', async () => {
104-
const mockVariantWithoutBonusProduct = {...mockBundledProductItemsVariant}
105-
delete mockVariantWithoutBonusProduct.bonusProductLineItem
106-
107-
renderWithProviders(<MockedComponent variant={mockVariantWithoutBonusProduct} />)
108-
await waitFor(() => {
109-
expect(screen.queryByText(/Bonus Product/i)).not.toBeInTheDocument()
110-
})
111-
})

packages/template-retail-react-app/app/static/translations/compiled/en-GB.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,12 +1901,6 @@
19011901
"value": "Secure"
19021902
}
19031903
],
1904-
"item_attributes.label.is_bonus_product": [
1905-
{
1906-
"type": 0,
1907-
"value": "Bonus Product"
1908-
}
1909-
],
19101904
"item_attributes.label.promotions": [
19111905
{
19121906
"type": 0,

packages/template-retail-react-app/app/static/translations/compiled/en-US.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,12 +1901,6 @@
19011901
"value": "Secure"
19021902
}
19031903
],
1904-
"item_attributes.label.is_bonus_product": [
1905-
{
1906-
"type": 0,
1907-
"value": "Bonus Product"
1908-
}
1909-
],
19101904
"item_attributes.label.promotions": [
19111905
{
19121906
"type": 0,

packages/template-retail-react-app/app/static/translations/compiled/en-XA.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4013,20 +4013,6 @@
40134013
"value": "]"
40144014
}
40154015
],
4016-
"item_attributes.label.is_bonus_product": [
4017-
{
4018-
"type": 0,
4019-
"value": "["
4020-
},
4021-
{
4022-
"type": 0,
4023-
"value": "Ɓǿǿƞŭŭş Ƥřǿǿḓŭŭƈŧ"
4024-
},
4025-
{
4026-
"type": 0,
4027-
"value": "]"
4028-
}
4029-
],
40304016
"item_attributes.label.promotions": [
40314017
{
40324018
"type": 0,

packages/template-retail-react-app/translations/en-GB.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,9 +796,6 @@
796796
"icons.assistive_msg.lock": {
797797
"defaultMessage": "Secure"
798798
},
799-
"item_attributes.label.is_bonus_product": {
800-
"defaultMessage": "Bonus Product"
801-
},
802799
"item_attributes.label.promotions": {
803800
"defaultMessage": "Promotions"
804801
},

packages/template-retail-react-app/translations/en-US.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,9 +796,6 @@
796796
"icons.assistive_msg.lock": {
797797
"defaultMessage": "Secure"
798798
},
799-
"item_attributes.label.is_bonus_product": {
800-
"defaultMessage": "Bonus Product"
801-
},
802799
"item_attributes.label.promotions": {
803800
"defaultMessage": "Promotions"
804801
},

0 commit comments

Comments
 (0)