Skip to content

Commit e2a6ae9

Browse files
@W-19347548 feat: Guest users - update modal warning label for potential address loss prior to switch to one address toggle action (#3302)
* update label * update change log * update tests
1 parent b22f828 commit e2a6ae9

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## v8.1.0-dev (Sep 04, 2025)
22
- Updated the UI for StoreDisplay component which displays pickup in-store information on different pages. [#3248](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3248)
3-
- Added warning modal for guest users when toggling between multi ship and ship to one address. [3280] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3280)
3+
- Added warning modal for guest users when toggling between multi ship and ship to one address. [3280] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3280) [3302] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3302)
44

55
## v8.0.0 (Sep 04, 2025)
66
- Add support for environment level base paths on /mobify routes [#2892](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2892)

packages/template-retail-react-app/app/components/single-address-toggle-modal/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const confirmationMessage = defineMessage({
3131
})
3232

3333
const continueButtonLabel = defineMessage({
34-
defaultMessage: 'Switch to one address',
34+
defaultMessage: 'Switch',
3535
id: 'multi_ship_warning_modal.action.switch_to_one_address'
3636
})
3737

packages/template-retail-react-app/app/components/single-address-toggle-modal/index.test.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ describe('SingleAddressToggleModal', () => {
3838
expect(screen.queryByText('Switch to one address?')).not.toBeInTheDocument()
3939
})
4040

41-
it('calls onConfirm when Switch to one address button is clicked', () => {
41+
it('calls onConfirm when Switch button is clicked', () => {
4242
renderWithProviders(<SingleAddressToggleModal {...mockProps} />)
43-
const continueButton = screen.getByRole('button', {name: /switch to one address/i})
43+
const continueButton = screen.getByRole('button', {name: /switch/i})
4444
fireEvent.click(continueButton)
4545
expect(mockProps.onConfirm).toHaveBeenCalledTimes(1)
4646
})
@@ -61,7 +61,7 @@ describe('SingleAddressToggleModal', () => {
6161

6262
it('handles keyboard navigation', () => {
6363
renderWithProviders(<SingleAddressToggleModal {...mockProps} />)
64-
const continueButton = screen.getByRole('button', {name: /switch to one address/i})
64+
const continueButton = screen.getByRole('button', {name: /switch/i})
6565
const cancelButton = screen.getByRole('button', {name: /cancel/i})
6666
continueButton.focus()
6767
expect(document.activeElement).toBe(continueButton)

packages/template-retail-react-app/app/pages/checkout/partials/shipping-address.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jest.mock('@salesforce/retail-react-app/app/components/single-address-toggle-mod
202202
will be removed
203203
</div>
204204
<button data-testid="confirm-switch" onClick={onConfirm}>
205-
Switch to one address
205+
Switch
206206
</button>
207207
<button data-testid="cancel-switch" onClick={onCancel}>
208208
Cancel

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2512,7 +2512,7 @@
25122512
"multi_ship_warning_modal.action.switch_to_one_address": [
25132513
{
25142514
"type": 0,
2515-
"value": "Switch to one address"
2515+
"value": "Switch"
25162516
}
25172517
],
25182518
"multi_ship_warning_modal.message.addresses_will_be_removed": [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2512,7 +2512,7 @@
25122512
"multi_ship_warning_modal.action.switch_to_one_address": [
25132513
{
25142514
"type": 0,
2515-
"value": "Switch to one address"
2515+
"value": "Switch"
25162516
}
25172517
],
25182518
"multi_ship_warning_modal.message.addresses_will_be_removed": [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5308,7 +5308,7 @@
53085308
},
53095309
{
53105310
"type": 0,
5311-
"value": "Şẇīŧƈħ ŧǿǿ ǿǿƞḗḗ ȧȧḓḓřḗḗşş"
5311+
"value": "Şẇīŧƈħ"
53125312
},
53135313
{
53145314
"type": 0,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@
10541054
"defaultMessage": "Cancel"
10551055
},
10561056
"multi_ship_warning_modal.action.switch_to_one_address": {
1057-
"defaultMessage": "Switch to one address"
1057+
"defaultMessage": "Switch"
10581058
},
10591059
"multi_ship_warning_modal.message.addresses_will_be_removed": {
10601060
"defaultMessage": "If you switch to one address, the shipping addresses you added for the items will be removed."

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@
10541054
"defaultMessage": "Cancel"
10551055
},
10561056
"multi_ship_warning_modal.action.switch_to_one_address": {
1057-
"defaultMessage": "Switch to one address"
1057+
"defaultMessage": "Switch"
10581058
},
10591059
"multi_ship_warning_modal.message.addresses_will_be_removed": {
10601060
"defaultMessage": "If you switch to one address, the shipping addresses you added for the items will be removed."

0 commit comments

Comments
 (0)