<commit_before>Feature: User sessions
  In order to access the site
  As a user
  I must first log in

  Scenario: Accessing page without logging in redirects to login page
    When I visit the providers page
    Then I should be on the login page

  Scenario: Login returns user to previous page
    Given I visit the providers page
    And I login
    Then I should be on the providers page

  Scenario: Retrieve forgotten username
    Given there is a user "admin"
    And I am on the login page
    And I follow "username_link"
    Then I should have the following query string:
      | card | username_recovery |
    And I should see "Username unknown?"
    And I fill in "email" with "<EMAIL>"
    And I press "Recover Usernames"
    Then I should see "Usernames have been sent to given e-mail address."

  Scenario: Request for the forgotten password reset
    Given there is a user "admin"
    And I am on the login page
    And I follow "password_link"
    Then I should have the following query string:
      | card | password_reset |
    And I should see "Forgot your password?"
    And I fill in "username" with "admin"
    And I fill in "email" with "<EMAIL>"
    And I press "Reset Password"
    Then I should see "Instructions for resetting your password have been emailed."

  Scenario: Change password using the reset token from email
    Given there is a user "admin"
    And user "admin" has valid password reset token "some_random_string"
    When I go to the password reset page with token "some_random_string"
    Then I should see "Change Password"
    When I fill in "password_field" with "<PASSWORD>"
    And I fill in "confirm_field" with "<PASSWORD>"
    And I press "Change Password"
    Then I should see "Password has been successfuly reset. Please log in."

  Scenario: I passwords don't match when changing password with reset token
    Given there is a user "admin"
    And user "admin" has valid password reset token "some_random_string"
    When I go to the password reset page with token "some_random_string"
    Then I should see "Change Password"
    When I fill in "password_field" with "<PASSWORD>"
    And I fill in "confirm_field" with "<PASSWORD>"
    And I press "Change Password"
    And I should see "Password doesn't match confirmation"<commit_msg>Fix user_session.feature scenarios<commit_after>Feature: User sessions
  In order to access the site
  As a user
  I must first log in

  Scenario: Accessing page without logging in redirects to login page
    When I visit the providers page
    Then I should be on the login page

  Scenario: Login returns user to previous page
    Given I visit the providers page
    And I login
    Then I should be on the providers page

  Scenario: Retrieve forgotten username
    Given there is a user "admin"
    And I am on the login page
    And I follow "username_link"
    Then I should have the following query string:
      | card | username_recovery |
    And I should see "Username Unknown"
    And I fill in "email" with "<EMAIL>"
    And I press "Send Login"
    Then I should see "Usernames have been sent to given e-mail address."

  Scenario: Request for the forgotten password reset
    Given there is a user "admin"
    And I am on the login page
    And I follow "password_link"
    Then I should have the following query string:
      | card | password_reset |
    And I should see "Password Unknown"
    And I fill in "username" with "admin"
    And I fill in "email" with "<EMAIL>"
    And I press "Reset Password"
    Then I should see "Instructions for resetting your password have been emailed."

  Scenario: Change password using the reset token from email
    Given there is a user "admin"
    And user "admin" has valid password reset token "some_random_string"
    When I go to the password reset page with token "some_random_string"
    Then I should see "Change Password"
    When I fill in "password_field" with "<PASSWORD>"
    And I fill in "confirm_field" with "<PASSWORD>"
    And I press "Change Password"
    Then I should see "Password has been successfuly reset. Please log in."

  Scenario: I passwords don't match when changing password with reset token
    Given there is a user "admin"
    And user "admin" has valid password reset token "some_random_string"
    When I go to the password reset page with token "some_random_string"
    Then I should see "Change Password"
    When I fill in "password_field" with "<PASSWORD>"
    And I fill in "confirm_field" with "<PASSWORD>"
    And I press "Change Password"
    And I should see "Password doesn't match confirmation"
{'fraction_non_alphanumeric': 0.04980426272292301, 'fraction_numerical': 0.0, 'mean_word_length': 3.262279888785913, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6627161', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1201, 'n_words': 680}