Ma77Ball opened a new issue, #5226:
URL: https://github.com/apache/texera/issues/5226
### Task Summary
Create local-login.component.spec.ts for
frontend/src/app/hub/component/about/local-login/local-login.component.ts.
Behavior to cover:
- Form construction — allForms includes loginUsername, registerUsername,
loginPassword, registerPassword, registerConfirmationPassword with the correct
validators (required, minLength(6), and the custom confirmationValidator).
- confirmationValidator — returns { confirm: true } when
registerConfirmationPassword differs from registerPassword, {} otherwise.
- updateConfirmValidator — schedules updateValueAndValidity on
registerConfirmationPassword via setTimeout.
- ngOnInit — when GuiConfigService.env.defaultLocalUser has keys, patches
loginUsername and loginPassword from it.
- login — short-circuits and sets loginErrorMessage when
UserService.validateUsername fails; otherwise calls
UserService.login(username.trim(), password), navigates to
queryParams.returnUrl or DASHBOARD_USER_WORKFLOW on success, and on error calls
NotificationService.error with the error's message or "Incorrect username or
password".
- register — validates password length ≥ 6, password match, and
validateUsername; on success calls UserService.register and surfaces a success
notification; on error surfaces NotificationService.error with the error
message or "Registration failed".
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]