@W-18685522 Password Reset and Passwordless Integration Test#2669
@W-18685522 Password Reset and Passwordless Integration Test#2669jeremy-jung1 merged 53 commits intodevelopfrom
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
e2e/config.js
Outdated
| PWA_E2E_USER_EMAIL: process.env.PWA_E2E_USER_EMAIL, | ||
| PWA_E2E_USER_PASSWORD: process.env.PWA_E2E_USER_PASSWORD, | ||
| SOCIAL_LOGIN_RETAIL_APP_HOME: "https://wasatch-mrt-feature-public.mrt-storefront-staging.com" | ||
| MORE_LOGIN_OPTIONS_RETAIL_APP_HOME: "https://wasatch-mrt-feature-private.mrt-storefront-staging.com" |
There was a problem hiding this comment.
would we want to use an environment deployed in a pwa kit owned environment to make sure it doesnt get lost or deleted? I see in CI it uses this one:
pwa-kit/.github/workflows/e2e.yml
Line 374 in 8417719
There was a problem hiding this comment.
Also would we consider using a more generic name for the constant like RETAIL_REACT_APP_HOME_PRIVATE_CLIENT so it can be used for other private client E2E tests in the future?
There was a problem hiding this comment.
The RETAIL_APP_HOME doesn't have social and passwordless enabled, so consolidating on one site will lose us an E2E test "branch" of the PWA kit site configured without the social and passwordless changes, which has an impact on the UI. Right now we have two sites: one with the additional login features and one not, and I thought that was a good variety of sites.
I can make the deployment on the pwa-kit environment instead to make it more visible
There was a problem hiding this comment.
Oh sorry I meant, it looks like there are 2 PWA Kit sites:
- https://scaffold-pwa-e2e-pwa-kit-private.mobify-storefront.com (defined in e2e.yaml and not in the config)
- https://scaffold-pwa-e2e-tests-pwa-kit.mobify-storefront.com (defined in the config)
Was wondering if we should reuse https://scaffold-pwa-e2e-pwa-kit-private.mobify-storefront.com instead of creating a new one in the PWA Kit project
There was a problem hiding this comment.
If we want to keep the tests for the old login paths then we should create a new site. https://scaffold-pwa-e2e-pwa-kit-private.mobify-storefront.com/ is the one that the e2e tests get executed on. The current e2e tests for shopper login assumes the UI for these new login features are turned off.
The new tests in this PR work on a UI where the passwordless login is enabled, so it has to go on a separate site. If we reuse a site, then we will lose the e2e test "coverage" on the old configuration without the features enabled.
There was a problem hiding this comment.
Ah I think Jinsu is suggesting using the scaffold-pwa project because that is internal use only - so external non-PWA folks cannot alter or delete the environments
There was a problem hiding this comment.
Updated the environment to be in scaffold-pwa and change the variable name to include other features that are defaulted to be off.
There was a problem hiding this comment.
@jeremy-jung1 I know you already created the env, but is there potentially a better name that describes the configuration of the env?
I had originally thought the difference with this env vs the original e2e env is that it’s configured with a SLAS private client
There was a problem hiding this comment.
The new environment is called EXTRA_FEATURES_E2E_RETAIL_APP_HOME. Instead of just features that has to be configured with SLAS Private Client, I thought a more encompassing name for features that are off by default would be good. Some features in the future might be dependent on other conditions. Social login is default to disabled too, but that isn't dependent on SLAS Private Client.
| - Gracefully handle missing SDK Clients in CommerceApiProvider [#2539](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2539) | ||
| - Refactor commerce-sdk-react to allow injecting ApiClients [#2519](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2519) | ||
|
|
||
|
|
There was a problem hiding this comment.
For some reason the changelog_check required me to make an update to the commerce-sdk-react CHANGELOG, even though I don't have any changes here. Just putting a new line
e2e/tests/desktop/login.spec.js
Outdated
|
|
||
| expect(params.get('user_id')).toBe(config.PWA_E2E_USER_EMAIL) | ||
| expect(params.get('mode')).toBe('callback') | ||
| expect(params.get('channel_id')).toBe('RefArchGlobal') |
There was a problem hiding this comment.
Move the siteID to config as well. Incase we need to move the site we're pointing to.
e2e/tests/desktop/login.spec.js
Outdated
|
|
||
| expect(params.get('user_id')).toBe(config.PWA_E2E_USER_EMAIL) | ||
| expect(params.get('mode')).toBe('callback') | ||
| expect(params.get('channel_id')).toBe('RefArch') |
There was a problem hiding this comment.
Same. Avoid hardcoded config values.
|
Re-iterating for visibility: Just curious about test orchestration. Consider extracting these tests into their own playwright project (add a new entry to the projects: [] where only these files run) |
shethj
left a comment
There was a problem hiding this comment.
Thanks for adding these in. LGTM 🚀


Description
Work Item
Currently, there are no active e2e tests in the PWA Kit for Password Reset and Passwordless Login. This is because these flows are more complex and require user interaction for successful completion. Although not end to end due to the limitation of not being able to programmatically access an email inbox without some commitments (https://salesforce.quip.com/7Ab4AT4aeKyj), we will test to ensure that at least the PWA kit features are communicating necessary information to external services (e.g. SLAS and marketing cloud) and showing the right views.
Some features in the template retail react app is defaulted to be "off" (e.g., if they are dependent on SLAS private client). Thus, these features are not reflected in the current E2E test sites. For these "extra" features, a separate E2E test site is nightly synced with the branch
extra-features-e2e-branch, which will also merge develop into itself nightly. E2E tests on these features will run against this site.Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization