SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
744 stars 389 forks source link

Change cms label from reset-password to the pw/change #3526

Closed KateChuen closed 5 years ago

KateChuen commented 5 years ago

Environment Details Spartacus: Release 1.0 Browser: Safari Device: mac Happens on: https://dev-com-19.accdemo.b2c.ydev.hybris.com:4200/electronics-spa/en/USD/

Steps to Reproduce Click on Forgot password Enter your email add and click 'Send' Go to the email and click on the link to reset password

Actual Result The link brings you to the Login Page instead of the Reset password page. However the link in the email is ok, it's http://dev-com-19.accdemo.b2c.ydev.hybris.com:4200/login/pw/change?token=Tgv4JbOoP4Wzqd6ov%2BtIRL%2BOaTVnCh8P%2Bwi5LIWpmVBBr2ngB19WZaAh7kFtO4PQlIcSAenKpPZ9lLhuDBV%2FDKMMAtaS6us6OxrS5dN5R66YIIbTfsYj34LZfWdUAkzA9BVreLIWiHFwGgUaJOyB99zjxQdMGu5qL54%3D

But when I click on it, it redirects me to this link which then displays the login page: (Notice the extra "electronics-spa/en/USD" part in the link. http://dev-com-19.accdemo.b2c.ydev.hybris.com:4200/electronics-spa/en/USD/login/pw/change?token=Tgv4JbOoP4Wzqd6ov%2BtIRL%2BOaTVnCh8P%2Bwi5LIWpmVBBr2ngB19WZaAh7kFtO4PQlIcSAenKpPZ9lLhuDBV%2FDKMMAtaS6us6OxrS5dN5R66YIIbTfsYj34LZfWdUAkzA9BVreLIWiHFwGgUaJOyB99zjxQdMGu5qL54%3D

Note The reason this happens is because the url is misconfigured in the backend. Kris says: "The url sent in the email is wrong - /login/pw/change. The correct one is /login/reset-password." More info in ticket #3459

So we will need to update this to make sure we have the right configuration going forward. But Wei says there is no way to configure what the url pattern is for reset password, her solution is to change the cms label from reset-password to the pw/change.

So this ticket is to do just that.

Xymmer commented 5 years ago

I tested this theory on dev19, wei is correct she said she'd update the sample data

WeizhengSap commented 5 years ago

PR is here: https://github.tools.sap/cx-commerce/c3po-legacy-spartacussampledataaddon/pull/5

beauty store PR: https://github.tools.sap/cx-commerce/c3po-legacy-beautystore/pull/4

KateChuen commented 5 years ago

Updated the e2e test to reflect this cms label change. !!!!!!!!!!!!!!!!!!!!! Please also review ticket #3559 at the same time !!!!!!!!!!!!!!!

KateChuen commented 5 years ago

Tested on my local by running the e2e tests.