ita-social-projects/GreenCity

Change password in personal cabinet

Closed this issue · 1 comments

As a user, I want to change my password in my UBS-client profile page so that** I can have a new password for security reasons.

Mock-ups:
1.https://www.figma.com/file/JvDAu4MHnh1Vxc5FaokyiA/ITA-UBS-styles?node-id=20703%3A62598
2.

Pre-conditions:

  1. User is registered
  2. User has clicked on “Дані користувача/User Data” tab.
  3. User has clicked on “Змінити пароль/Change password” button.

Acceptance criteria:

  1. If a user clicks on old password text field, and leaves it empty, then error message appears:
    En: “Old password is required.”.
    Ua: “Будь ласка введіть свій попередній пароль.”.

  2. If a user clicks on new password text field, and leaves it empty, then error message appears:
    En: “New password is required.”.
    Ua: “Будь ласка введіть свій новий пароль.”.

  3. If a user clicks on confirm new password text field, and leaves it empty, then error message appears:
    En: “Please retype your new password.”.
    Ua: “Будь ласка введіть свій новий пароль ще раз .”.

  4. If the user entered less than 8 characters in confirm password text field, then an informational message appears:
    En: “Password must be at least 8 characters long without spaces.”.
    Ua: “Пароль повинен містити принаймні 8 символів без пробілів.”.

  5. If the user entered more than 20 characters in confirm password text field, then an informational message appears:
    En: “Password must be less than 20 characters long without spaces.”.
    Ua: “Пароль повинен бути меншим ніж 20 символів без пробілів.”.

  6. If the user entered a password that does not match a criteria in new password or/and confirm new password, then error message appears:
    En: “Password should be at least one character of Uppercase letter (A-Z), Lowercase letter (a-z), Digit (0-9), Special character (~!@#$%^&*()+=_-{}[]|:;”’?/<>,.). ”. _Ua:_ “Пароль повинен містити хоча б один символ латинського алфавіту верхнього (A-Z) та нижнього регістру (a-z), число (0-9) та спеціальний символ (~!@#$%^&*()+=_-{}[]|:;”’?/<>,.).”.

  7. **If new password and confirm new password does not match, then error message appears:
    En: “Passwords do not match.”.
    Ua: “Паролі не співпадають.”.

Scenarios:

  1. Given user registered with Google.
    When user has clicked onChange password button.
    Then the pop-up window is showed with 2 fields: New password and Confirm new password (The second mock-up is used.).

  2. Given user registered with credentials.
    When user has clicked on Change password button.
    Then the pop-up window is showed with 3 fields: Old password,New password , and Confirm new password (The first mock-up is used.).

  3. Given user registered with credentials .
    **When ** user has entered wrong old password,
    And clicked on **Change password ** button.
    Then all fields are cleared,
    And error message under old password field:
    En: “Wrong password.”.
    Ua: “Пароль не правильний.”

  4. Given user registered with credentials.
    When ** entered in old password, new password and confirm new password meet requirements.
    Then the
    Change password ** button is activated.

  5. Given registered user,
    **When ** user has clicked on **Change password ** button 3 times in a row,
    **And ** error message “Wrong password.” appeared all 3 times.
    Then error message:
    En: “Wrong password.You have made too many attempts, please try again in 30 minutes”.
    Ua: “Пароль не правильний. Ви зробили занадто багато спроб, спробуйте ще раз через 30 хв”

For password requirements: #4277 section 4

  1. If a user clicks on old password text field, and leaves it empty, there is no error message appears
  2. If a user clicks on new password text field, and leaves it empty, there is no error message appears
  3. If a user clicks on confirm new password text field, and leaves it empty, there is no error message appears
  4. If the user entered less than 8 characters in confirm password text field, there is no error message appears
  5. If the user entered more than 20 characters in confirm password text field, there is no error message appears
  6. If the user entered a password that does not match a criteria in new password or/and confirm new password there is no error message appears