-
Notifications
You must be signed in to change notification settings - Fork 393
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
Conversation
Merge Checks Failed
|
spartacus Run #46612
Run Properties:
|
Project |
spartacus
|
Branch Review |
feature/CXSPA-8773
|
Run status |
Passed #46612
|
Run duration | 12m 28s |
Commit |
37ba419d89 ℹ️: Merge aa8d4b5f0be917bc3e7d056d6ca4da67861aa607 into f16704a26be16195d114ee7a03bd...
|
Committer | Grace Dong |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
5
|
Pending |
2
|
Skipped |
0
|
Passing |
125
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
@@ -5,6 +5,10 @@ | |||
"label": "Title (optional)", | |||
"placeholder": "Title" | |||
}, | |||
"titleCodeOnOTPForm": { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird name...
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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()?
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.