<commit_before>@webUI @insulated @disablePreviews @mailhog

Feature: reset the password
  As a user
  I want to reset my password
  So that I can login to my account again after forgetting the password

  Background:
    Given these users have been created with default attributes but not initialized:
      | username |
      | user1    |
    And the user has browsed to the login page
    And the user logs in with username "user1" and invalid password "%<PASSWORD>%" using the webUI

  @smokeTest
  Scenario: send password reset email
    When the user requests the password reset link using the webUI
    Then a message with this text should be displayed on the webUI:
      """
      The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders. If it is not there ask your local administrator.
      """
    And the email address "<EMAIL>" should have received an email with the body containing
      """
      Use the following link to reset your password:
      """

  @skipOnEncryption
  @smokeTest
  Scenario: reset password for the ordinary (no encryption) case
    When the user requests the password reset link using the webUI
    And the user follows the password reset link from email address "<EMAIL>"
    Then the user should be redirected to a webUI page with the title "%productname%"
    When the user resets the password to "%alt3%" and confirms with the same password using the webUI
    Then the email address "<EMAIL>" should have received an email with the body containing
      """
      Password changed successfully
      """
    When the user logs in with username "user1" and password "%<PASSWORD>%" using the webUI
    Then the user should be redirected to a webUI page with the title "Files - %productname%"
<commit_msg>Skip new password reset tests on older 10.1 and 10.0<commit_after>@webUI @insulated @disablePreviews @mailhog

Feature: reset the password
  As a user
  I want to reset my password
  So that I can login to my account again after forgetting the password

  Background:
    Given these users have been created with default attributes but not initialized:
      | username |
      | user1    |
    And the user has browsed to the login page
    And the user logs in with username "user1" and invalid password "%<PASSWORD>%" using the webUI

  @smokeTest
  Scenario: send password reset email
    When the user requests the password reset link using the webUI
    Then a message with this text should be displayed on the webUI:
      """
      The link to reset your password has been sent to your email. If you do not receive it within a reasonable amount of time, check your spam/junk folders. If it is not there ask your local administrator.
      """
    And the email address "<EMAIL>" should have received an email with the body containing
      """
      Use the following link to reset your password:
      """

  @skipOnEncryption @skipOnOcV10.0 @skipOnOcV10.1
  @smokeTest
  Scenario: reset password for the ordinary (no encryption) case
    When the user requests the password reset link using the webUI
    And the user follows the password reset link from email address "<EMAIL>"
    Then the user should be redirected to a webUI page with the title "%productname%"
    When the user resets the password to "%<PASSWORD>%" and confirms with the same password using the webUI
    Then the email address "<EMAIL>" should have received an email with the body containing
      """
      Password changed successfully
      """
    When the user logs in with username "user1" and password "%<PASSWORD>%" using the webUI
    Then the user should be redirected to a webUI page with the title "Files - %productname%"

{'fraction_non_alphanumeric': 0.048417132216014895, 'fraction_numerical': 0.005054535780792764, 'mean_word_length': 3.32183908045977, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3519948', 'n_tokens_mistral': 949, 'n_tokens_neox': 917, 'n_words': 547}