Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Frontend
Minds Frontend
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Dependency List
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 832
    • Issues 832
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 71
    • Merge Requests 71
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Registry
    • Registry
  • Packages
    • Packages
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds FrontendMinds Frontend
  • Merge Requests
  • !369

Closed
Opened 1 week ago by Ben Hayward@benhayward.ben
  • Report abuse
Report abuse

[Sprint/HipsterHedgehog](bug): Forgot password validation and refactor

Closes #1442

I'm open on ideas on how to test this as forgot password locally leads to a blank screen for me. Tried to do this test driven as I cannot see the result.

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://gitlab.com/benhayward.ben/front.git forgot-password-validation-and-refactor
git checkout -b benhayward.ben/front-forgot-password-validation-and-refactor FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff benhayward.ben/front-forgot-password-validation-and-refactor

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge benhayward.ben:forgot-password-validation-and-refactor into master
  • Email patches
  • Plain diff
Pipeline #67424718 passed for f2e55131 on benhayward.ben:forgot-password-validation-and-refactor
    Requires approval from Devs. Approved by
    Emiliano Balbuena
    Emiliano Balbuena
    Brian Hatchet
    Brian Hatchet
    Mark Harding
    Mark Harding
    Martin Santangelo
    Martin Santangelo
    Marcelo Rivera
    Marcelo Rivera

    Closed by Ben Hayward 2 hours ago

    The changes were not merged into master

    Allows commits from members who can merge to the target branch

    Did not close #1442

    Deletes source branch

    • Discussion 3
    • Commits 2
    • Pipelines 2
    • Changes 5
    0/2 discussions resolved
    • Loading...
    • Emiliano Balbuena @edgebal approved this merge request 6 days ago

      approved this merge request

    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 3 days ago
      Last updated by Marcelo Rivera 1 day ago
      src/app/modules/auth/forgot-password/forgot-password.component.ts
      96 code: this.code,
      97 username: this.username
      98 })
      99 .then((response: any) => {
      100 this.session.login(response.user);
      101 this.router.navigate(['/newsfeed']);
      102 })
      103 .catch((e) => {
      104 this.error = e.message;
      105 setTimeout(() => {
      106 this.router.navigate(['/login']);
      107 }, 2000);
      108 });
      91 this.error = '';
      92 if (!this.validatePassword(password)) {
      93 this.error = 'Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces.';
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 3 days ago
        Maintainer

        This should be in the template with the translation markers wrapped around it.

      • Marcelo Rivera
        Marcelo Rivera @eiennohi · 1 day ago
        Developer

        I agree with Brian. Pretty important not to ignore i18n here.

      Please register or sign in to reply
    • Brian Hatchet
      Brian Hatchet :speech_balloon: @brianhatchet started a discussion on the diff 3 days ago
      src/app/modules/auth/forgot-password/forgot-password.component.spec.ts
      251 clientMock.post.calls.reset();
      252 sessionMock.login.calls.reset();
      253 getResetButton().nativeElement.click();
      254
      255 tick();
      256 fixture.detectChanges();
      257
      258 expect(getError().nativeElement.textContent).toContain('Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces.');
      259 expect(clientMock.post).not.toHaveBeenCalled();
      260 expect(sessionMock.login).not.toHaveBeenCalled();
      261 }));
      262
      263 it('should not allow the user to enter a password with fewer than 8 characters', fakeAsync(() => {
      264 comp.step = 3;
      265 comp.username = 'test';
      266 comp.code = 'code';
      • Brian Hatchet
        Brian Hatchet :speech_balloon: @brianhatchet · 3 days ago
        Maintainer

        Amazing tests. :thumbsup:

      Please register or sign in to reply
    • Ben Hayward @benhayward.ben closed 2 hours ago

      closed

    • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
    Please register or sign in to reply
    Assignee
    None
    Assign to
    None
    Milestone
    None
    Assign milestone
    None
    Time tracking
    No estimate or time spent
    0
    Labels
    None
    Assign labels
    • View project labels
    Lock merge request
    Unlocked
    6
    6 participants
    user avatar
    Brian Hatchet
    user avatar
    Mark Harding
    user avatar
    Martin Santangelo
    user avatar
    Marcelo Rivera
    user avatar
    Ben Hayward
    user avatar
    Emiliano Balbuena
    Reference: minds/front!369