Skip to content
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
1 change: 1 addition & 0 deletions e2e/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ module.exports = {
PWA_E2E_USER_EMAIL: process.env.PWA_E2E_USER_EMAIL,
PWA_E2E_USER_PASSWORD: process.env.PWA_E2E_USER_PASSWORD,
EXTRA_FEATURES_E2E_RETAIL_APP_HOME:
process.env.EXTRA_FEATURES_E2E_RETAIL_APP_HOME ||
'https://scaffold-pwa-extra-features-e2e.mobify-storefront.com',
EXTRA_FEATURES_E2E_RETAIL_APP_HOME_SITE: 'RefArchGlobal'
}
19 changes: 7 additions & 12 deletions e2e/tests/desktop/extra-features.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test('Verify passwordless login request', async ({page}) => {
await page.locator('#email').scrollIntoViewIfNeeded()
await page.fill('#email', config.PWA_E2E_USER_EMAIL)

await page.getByRole('button', {name: 'Continue Securely'}).click()
await page.getByRole('button', {name: 'Continue'}).click()

await page.waitForResponse(
'**/mobify/slas/private/shopper/auth/v1/organizations/*/oauth2/passwordless/login'
Expand All @@ -47,12 +47,11 @@ test('Verify passwordless login request', async ({page}) => {
const params = new URLSearchParams(postData)

expect(params.get('user_id')).toBe(config.PWA_E2E_USER_EMAIL)
expect(params.get('mode')).toBe('callback')
expect(params.get('mode')).toBe('email')
expect(params.get('channel_id')).toBe(config.EXTRA_FEATURES_E2E_RETAIL_APP_HOME_SITE)
expect(params.get('callback_uri')).toMatch(/.*\/passwordless-login-callback$/)
})

test('Verify password reset callback request', async ({page}) => {
test('Verify password reset request', async ({page}) => {
let interceptedRequest = null

await page.route(
Expand Down Expand Up @@ -88,16 +87,13 @@ test('Verify password reset callback request', async ({page}) => {
const params = new URLSearchParams(postData)

expect(params.get('user_id')).toBe(config.PWA_E2E_USER_EMAIL)
expect(params.get('mode')).toBe('callback')
expect(params.get('mode')).toBe('email')
expect(params.get('channel_id')).toBe(config.EXTRA_FEATURES_E2E_RETAIL_APP_HOME_SITE)
expect(params.get('callback_uri')).toMatch(/.*\/reset-password-callback$/)
expect(params.get('hint')).toBe('cross_device')
})

// Verify on the login UI that looks different when extra login features are not enabled
test('Verify password reset callback request when extra login features are not enabled', async ({
page
}) => {
test('Verify password reset request when extra login features are not enabled', async ({page}) => {
let interceptedRequest = null

await page.route(
Expand Down Expand Up @@ -132,13 +128,12 @@ test('Verify password reset callback request when extra login features are not e
const params = new URLSearchParams(postData)

expect(params.get('user_id')).toBe(config.PWA_E2E_USER_EMAIL)
expect(params.get('mode')).toBe('callback')
expect(params.get('mode')).toBe('email')
expect(params.get('channel_id')).toBe(config.RETAIL_APP_HOME_SITE)
expect(params.get('callback_uri')).toMatch(/.*\/reset-password-callback$/)
expect(params.get('hint')).toBe('cross_device')
})

test('Verify password reset request', async ({page}) => {
test('Verify password reset action request', async ({page}) => {
let interceptedRequest = null
await page.route(
'**/mobify/slas/private/shopper/auth/v1/organizations/*/oauth2/password/action',
Expand Down
21 changes: 8 additions & 13 deletions e2e/tests/mobile/extra-features.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ test('Verify passwordless login request on mobile', async ({page}) => {
await page.locator('#email').scrollIntoViewIfNeeded()
await page.fill('#email', config.PWA_E2E_USER_EMAIL)

await page.getByRole('button', {name: 'Continue Securely'}).scrollIntoViewIfNeeded()
await page.getByRole('button', {name: 'Continue Securely'}).click()
await page.getByRole('button', {name: 'Continue'}).scrollIntoViewIfNeeded()
await page.getByRole('button', {name: 'Continue'}).click()

await page.waitForResponse(
'**/mobify/slas/private/shopper/auth/v1/organizations/*/oauth2/passwordless/login'
Expand All @@ -49,14 +49,11 @@ test('Verify passwordless login request on mobile', async ({page}) => {
const params = new URLSearchParams(postData)

expect(params.get('user_id')).toBe(config.PWA_E2E_USER_EMAIL)
expect(params.get('mode')).toBe('callback')
expect(params.get('mode')).toBe('email')
expect(params.get('channel_id')).toBe(config.EXTRA_FEATURES_E2E_RETAIL_APP_HOME_SITE)
expect(params.get('callback_uri')).toMatch(/.*\/passwordless-login-callback$/)
})

test('Verify password reset callback request on mobile (extra features enabled)', async ({
page
}) => {
test('Verify password reset request on mobile (extra features enabled)', async ({page}) => {
let interceptedRequest = null

await page.route(
Expand Down Expand Up @@ -92,13 +89,12 @@ test('Verify password reset callback request on mobile (extra features enabled)'
const params = new URLSearchParams(postData)

expect(params.get('user_id')).toBe(config.PWA_E2E_USER_EMAIL)
expect(params.get('mode')).toBe('callback')
expect(params.get('mode')).toBe('email')
expect(params.get('channel_id')).toBe(config.EXTRA_FEATURES_E2E_RETAIL_APP_HOME_SITE)
expect(params.get('callback_uri')).toMatch(/.*\/reset-password-callback$/)
expect(params.get('hint')).toBe('cross_device')
})

test('Verify password reset callback request on mobile when extra login features are not enabled', async ({
test('Verify password reset request on mobile when extra login features are not enabled', async ({
page
}) => {
let interceptedRequest = null
Expand Down Expand Up @@ -136,13 +132,12 @@ test('Verify password reset callback request on mobile when extra login features
const params = new URLSearchParams(postData)

expect(params.get('user_id')).toBe(config.PWA_E2E_USER_EMAIL)
expect(params.get('mode')).toBe('callback')
expect(params.get('mode')).toBe('email')
expect(params.get('channel_id')).toBe(config.RETAIL_APP_HOME_SITE)
expect(params.get('callback_uri')).toMatch(/.*\/reset-password-callback$/)
expect(params.get('hint')).toBe('cross_device')
})

test('Verify password reset request on mobile', async ({page}) => {
test('Verify password reset action request on mobile', async ({page}) => {
let interceptedRequest = null
await page.route(
'**/mobify/slas/private/shopper/auth/v1/organizations/*/oauth2/password/action',
Expand Down
4 changes: 2 additions & 2 deletions packages/template-retail-react-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## v8.4.0-dev (Dec 17, 2025)
- [Feature] Add `fuzzyPathMatching` to reduce computational overhead of route generation at time of application load [#3530](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3530)
- Update passwordless login and password reset to use email mode by default. The mode can now be configured across the login page, auth modal, and checkout page [#3492](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3492) [#3547](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3547)
- Update "Continue Securely" button text to "Continue" for passwordless login [#3556](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3556)

## v8.3.0 (Dec 17, 2025)
- [Bugfix] Fix Forgot Password link not working from Account Profile password update form [#3493](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3493)
- Introduce Address Autocompletion feature in the checkout flow, powered by Google Maps Platform [#3071](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3071)

- Update passwordless login and password reset to use email mode by default. The mode can now be configured across the login page, auth modal, and checkout page [#3492](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3492) [#3547](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3547)

## v8.2.0 (Nov 04, 2025)
- Add support for Rule Based Promotions for Choice of Bonus Products. We are currently supporting only one product level rule based promotion per product [#3418](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3418)
- Add support for Rule Based Promotions for Choice of Bonus Products. We are currently supporting only one product level rule based promotion per product [#3418](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3418)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ describe('LoginForm', () => {
expect(screen.getByText(/Welcome Back/)).toBeInTheDocument()
expect(screen.getByLabelText('Email')).toBeInTheDocument()
expect(screen.queryByLabelText('Password')).not.toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Continue Securely'})).toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Continue'})).toBeInTheDocument()
expect(screen.getByText(/Or Login With/)).toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Password'})).toBeInTheDocument()
expect(screen.getByText(/Don't have an account/)).toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Create account'})).toBeInTheDocument()
})

test('renders form errors when "Continue Securely" button is clicked', async () => {
test('renders form errors when "Continue" button is clicked', async () => {
const mockPasswordlessLoginClick = jest.fn()
const {user} = renderWithProviders(
<WrapperComponent
Expand All @@ -39,7 +39,7 @@ describe('LoginForm', () => {
/>
)

await user.click(screen.getByRole('button', {name: 'Continue Securely'}))
await user.click(screen.getByRole('button', {name: 'Continue'}))
expect(screen.getByText(/Please enter your email address./)).toBeInTheDocument()
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const PasswordlessLogin = ({
isLoading={form.formState.isSubmitting}
>
<FormattedMessage
defaultMessage="Continue Securely"
defaultMessage="Continue"
id="login_form.button.continue_securely"
/>
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('PasswordlessLogin component', () => {

expect(screen.getByLabelText('Email')).toBeInTheDocument()
expect(screen.queryByLabelText('Password')).not.toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Continue Securely'})).toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Continue'})).toBeInTheDocument()
expect(screen.getByText(/Or Login With/)).toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Password'})).toBeInTheDocument()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ test('allows regular login via Enter key in password mode', async () => {
await user.click(trigger)

await waitFor(() => {
expect(screen.getByText(/continue securely/i)).toBeInTheDocument()
expect(screen.getByText(/Continue/i)).toBeInTheDocument()
})

// enter email and switch to password mode
Expand Down Expand Up @@ -223,7 +223,7 @@ describe('Passwordless enabled', () => {
await user.click(trigger)

await waitFor(() => {
expect(screen.getByText(/continue securely/i)).toBeInTheDocument()
expect(screen.getByText(/Continue/i)).toBeInTheDocument()
})
})

Expand All @@ -240,14 +240,14 @@ describe('Passwordless enabled', () => {
await user.click(trigger)

await waitFor(() => {
expect(screen.getByText(/continue securely/i)).toBeInTheDocument()
expect(screen.getByText(/Continue/i)).toBeInTheDocument()
})

// enter a valid email address
await user.type(screen.getByLabelText('Email'), validEmail)

// initiate passwordless login
const passwordlessLoginButton = screen.getByText(/continue securely/i)
const passwordlessLoginButton = screen.getByText(/Continue/i)
await user.click(passwordlessLoginButton)
expect(
mockAuthHelperFunctions[AuthHelpers.AuthorizePasswordless].mutateAsync
Expand Down Expand Up @@ -289,7 +289,7 @@ describe('Passwordless enabled', () => {
await user.click(trigger)

await waitFor(() => {
expect(screen.getByText(/continue securely/i)).toBeInTheDocument()
expect(screen.getByText(/Continue/i)).toBeInTheDocument()
})

// enter a valid email address
Expand Down Expand Up @@ -343,11 +343,11 @@ describe('Passwordless enabled', () => {
await user.click(trigger)

await waitFor(() => {
expect(screen.getByText(/continue securely/i)).toBeInTheDocument()
expect(screen.getByText(/Continue/i)).toBeInTheDocument()
})

await user.type(screen.getByLabelText('Email'), validEmail)
await user.click(screen.getByText(/continue securely/i))
await user.click(screen.getByText(/Continue/i))

expect(
mockAuthHelperFunctions[AuthHelpers.AuthorizePasswordless].mutateAsync
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ describe('Passwordless login tests', () => {
await user.type(screen.getByLabelText('Email'), testEmail)

// Click the submit button
await user.click(screen.getByRole('button', {name: /Continue Securely/i}))
await user.click(screen.getByRole('button', {name: /Continue/i}))

// Verify that authorizePasswordless is called with correct parameters
await waitFor(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2624,7 +2624,7 @@
"login_form.button.continue_securely": [
{
"type": 0,
"value": "Continue Securely"
"value": "Continue"
}
],
"login_form.button.google": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2624,7 +2624,7 @@
"login_form.button.continue_securely": [
{
"type": 0,
"value": "Continue Securely"
"value": "Continue"
}
],
"login_form.button.google": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5500,7 +5500,7 @@
},
{
"type": 0,
"value": "Ƈǿǿƞŧīƞŭŭḗḗ Şḗḗƈŭŭřḗḗŀẏ"
"value": "Ƈǿǿƞŧīƞŭŭḗḗ"
},
{
"type": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@
"defaultMessage": "Back to Sign In Options"
},
"login_form.button.continue_securely": {
"defaultMessage": "Continue Securely"
"defaultMessage": "Continue"
},
"login_form.button.google": {
"defaultMessage": "Google"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@
"defaultMessage": "Back to Sign In Options"
},
"login_form.button.continue_securely": {
"defaultMessage": "Continue Securely"
"defaultMessage": "Continue"
},
"login_form.button.google": {
"defaultMessage": "Google"
Expand Down
Loading