Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: As a customer, I want to request OTP and use it to request registration of a B2B customer on Composable Storefront #19839

Merged
merged 24 commits into from
Jan 17, 2025

Conversation

i53577
Copy link
Contributor

@i53577 i53577 commented Jan 8, 2025

No description provided.

@i53577 i53577 changed the title Feature/cxspa 8773 feat: As a customer, I want to request OTP and use it to request registration of a B2B customer on Composable Storefront Jan 9, 2025
@i53577 i53577 marked this pull request as ready for review January 9, 2025 15:56
@i53577 i53577 requested review from a team as code owners January 9, 2025 15:56
@github-actions github-actions bot marked this pull request as draft January 9, 2025 15:56
@i53577 i53577 marked this pull request as ready for review January 9, 2025 16:02
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Merge Checks Failed

Please push a commit to re-trigger the build. 
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions github-actions bot marked this pull request as draft January 9, 2025 16:05
@i53577 i53577 marked this pull request as ready for review January 10, 2025 03:00
Copy link

cypress bot commented Jan 10, 2025

spartacus    Run #46612

Run Properties:  status check passed Passed #46612  •  git commit 37ba419d89 ℹ️: Merge aa8d4b5f0be917bc3e7d056d6ca4da67861aa607 into f16704a26be16195d114ee7a03bd...
Project spartacus
Branch Review feature/CXSPA-8773
Run status status check passed Passed #46612
Run duration 12m 28s
Commit git commit 37ba419d89 ℹ️: Merge aa8d4b5f0be917bc3e7d056d6ca4da67861aa607 into f16704a26be16195d114ee7a03bd...
Committer Grace Dong
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 5
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 125
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

@@ -5,6 +5,10 @@
"label": "Title (optional)",
"placeholder": "Title"
},
"titleCodeOnOTPForm": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to define different labels when enable OTP or not

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the ux give different mockup for OTP enabled.

Copy link
Contributor

@niehuayang niehuayang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a small comment

): void {
this.routingService.go(
{
cxRoute: 'verifyTokenRegister',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird name...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about registerVerifyToken, it's defined here

  verifyToken: {
    paths: ['login/verify-token'],
    protected: false,
    authFlow: true,
  },
  registerVerifyToken: {
    paths: ['register/verify-token'],
    protected: false,
    authFlow: true,
  },
  register: {
    paths: ['login/register'],
    protected: false,
    authFlow: true,
  },

},
{
state: {
form: this.registerForm.value,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's strange to transfer a form to another component. hard to read

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

form value is transferred to verification token component, and will be handled by RegisterVerificationTokenFormComponentService.

Copy link
Contributor Author

@i53577 i53577 Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename it as registrationDataForm to make it more readable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the name defined from b2c PR verifyTokenForRegistration

{
state: {
form: this.registerForm.value,
loginId: verificationTokenCreation.loginId,
Copy link
Contributor

@scarai-sap scarai-sap Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can get the loginId from this.xxxx? like loginId: this.registerForm.value.email.toLowerCase()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

this.busy$.next(true);
const verificationTokenCreation = this.collectDataFromRegistrationForm();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a good name should tokenCreationReqBody or sth else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@github-actions github-actions bot marked this pull request as draft January 13, 2025 08:25
@i53577 i53577 changed the base branch from develop to feature/register-otp-rate-limit January 15, 2025 03:32
@i53577 i53577 marked this pull request as ready for review January 15, 2025 03:33
@i53577 i53577 merged commit ff609d0 into feature/register-otp-rate-limit Jan 17, 2025
4 checks passed
@i53577 i53577 deleted the feature/CXSPA-8773 branch January 17, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants