2017-07-26 21:45:26 +00:00
|
|
|
Feature: User is able to reset his password
|
|
|
|
|
|
|
|
Scenario: User is redirected to password reset page
|
2018-03-28 22:04:59 +00:00
|
|
|
Given I'm on "https://login.example.com:8080"
|
2017-07-26 21:45:26 +00:00
|
|
|
When I click on the link "Forgot password?"
|
2017-11-02 20:34:07 +00:00
|
|
|
Then I'm redirected to "https://login.example.com:8080/password-reset/request"
|
2017-07-26 21:45:26 +00:00
|
|
|
|
|
|
|
Scenario: User get an email with a link to reset password
|
2018-03-28 22:04:59 +00:00
|
|
|
Given I'm on "https://login.example.com:8080/password-reset/request"
|
2017-07-26 21:45:26 +00:00
|
|
|
When I set field "username" to "james"
|
|
|
|
And I click on "Reset Password"
|
2017-10-10 21:03:30 +00:00
|
|
|
Then I get a notification of type "success" with message "An email has been sent to you. Follow the link to change your password."
|
|
|
|
|
|
|
|
Scenario: Request password for unexisting user should behave like existing user
|
2018-03-28 22:04:59 +00:00
|
|
|
Given I'm on "https://login.example.com:8080/password-reset/request"
|
2017-10-10 21:03:30 +00:00
|
|
|
When I set field "username" to "fake_user"
|
|
|
|
And I click on "Reset Password"
|
2017-08-04 19:20:31 +00:00
|
|
|
Then I get a notification of type "success" with message "An email has been sent to you. Follow the link to change your password."
|
2017-07-26 21:45:26 +00:00
|
|
|
|
|
|
|
Scenario: User resets his password
|
2018-03-28 22:04:59 +00:00
|
|
|
Given I'm on "https://login.example.com:8080/password-reset/request"
|
2017-07-26 21:45:26 +00:00
|
|
|
And I set field "username" to "james"
|
|
|
|
And I click on "Reset Password"
|
|
|
|
When I click on the link of the email
|
|
|
|
And I set field "password1" to "newpassword"
|
|
|
|
And I set field "password2" to "newpassword"
|
|
|
|
And I click on "Reset Password"
|
2017-11-02 20:34:07 +00:00
|
|
|
Then I'm redirected to "https://login.example.com:8080/"
|
2017-07-26 21:45:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
Scenario: User does not confirm new password
|
2018-03-28 22:04:59 +00:00
|
|
|
Given I'm on "https://login.example.com:8080/password-reset/request"
|
2017-07-26 21:45:26 +00:00
|
|
|
And I set field "username" to "james"
|
|
|
|
And I click on "Reset Password"
|
|
|
|
When I click on the link of the email
|
|
|
|
And I set field "password1" to "newpassword"
|
|
|
|
And I set field "password2" to "newpassword2"
|
|
|
|
And I click on "Reset Password"
|
2017-08-04 19:20:31 +00:00
|
|
|
Then I get a notification of type "warning" with message "The passwords are different."
|