2017-09-01 15:24:36 +08:00
|
|
|
Feature: Forgot password
|
|
|
|
I forgot my password
|
|
|
|
I would like a new password
|
2018-05-21 21:29:18 +08:00
|
|
|
So that I can use SciNote
|
2017-09-01 15:24:36 +08:00
|
|
|
|
|
|
|
Background:
|
2017-11-08 23:23:52 +08:00
|
|
|
Given the "BioSistemika Process" team exists
|
2017-11-08 18:59:01 +08:00
|
|
|
Given the following users are registered
|
|
|
|
| email | password | password_confirmation |
|
|
|
|
| nonadmin@myorg.com | mypassword1234 | mypassword1234 |
|
2017-11-08 23:23:52 +08:00
|
|
|
And "nonadmin@myorg.com" is in "BioSistemika Process" team as a "admin"
|
2017-09-01 15:24:36 +08:00
|
|
|
|
2017-11-08 18:59:01 +08:00
|
|
|
@javascript
|
2017-09-01 15:24:36 +08:00
|
|
|
Scenario: User forgot their password and requests for new password
|
2017-11-08 18:59:01 +08:00
|
|
|
Given I am on reset password page
|
2018-01-31 19:05:45 +08:00
|
|
|
Then I fill in "nonadmin@myorg.com" in "#user_email" field
|
2020-03-31 16:16:51 +08:00
|
|
|
And I click "Reset password" button
|
2017-09-01 15:24:36 +08:00
|
|
|
Then I should see "You will receive an email with instructions on how to reset your password in a few minutes." flash message
|
|
|
|
|
2017-11-08 18:59:01 +08:00
|
|
|
@javascript
|
2017-09-01 15:24:36 +08:00
|
|
|
Scenario: User forgot their password and enters non valid email
|
2017-11-08 18:59:01 +08:00
|
|
|
Given I am on reset password page
|
2018-01-31 19:05:45 +08:00
|
|
|
Then I fill in "nonuser@myorg.com" in "#user_email" field
|
2020-03-31 16:16:51 +08:00
|
|
|
And I click "Reset password" button
|
2017-11-08 18:59:01 +08:00
|
|
|
Then I should see "Email not found"
|
2017-09-01 15:24:36 +08:00
|
|
|
|
2017-11-23 23:27:49 +08:00
|
|
|
@javascript
|
2017-09-01 15:24:36 +08:00
|
|
|
Scenario: User has got Reset Your Password email and click to link
|
2017-11-08 18:59:01 +08:00
|
|
|
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
|
|
|
Then I should be on Change your password page
|
2017-09-01 15:24:36 +08:00
|
|
|
|
2017-11-08 23:23:52 +08:00
|
|
|
@javascript
|
2017-09-01 15:24:36 +08:00
|
|
|
Scenario: User successfully Change password at Change your password page
|
2017-11-08 23:23:52 +08:00
|
|
|
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
2018-01-31 19:05:45 +08:00
|
|
|
Then I fill in "newpassword1234" in "#user_password" field
|
|
|
|
And I fill in "newpassword1234" in "#user_password_confirmation" field
|
2017-11-08 23:23:52 +08:00
|
|
|
And I click "Change my password" button
|
2018-05-09 19:54:49 +08:00
|
|
|
Then I should be on homepage
|
2017-09-01 15:24:36 +08:00
|
|
|
And I should see "Your password has been changed successfully. You are now logged in." flash message
|
|
|
|
|
2017-11-08 23:23:52 +08:00
|
|
|
@javascript
|
2017-09-01 15:24:36 +08:00
|
|
|
Scenario: User unsuccessfully Change password at Change your password page
|
2017-11-08 23:23:52 +08:00
|
|
|
Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com"
|
2018-01-31 19:05:45 +08:00
|
|
|
Then I fill in "newpassword1234" in "#user_password" field
|
|
|
|
And I fill in "nosamepassword" in "#user_password_confirmation" field
|
2017-11-08 23:23:52 +08:00
|
|
|
And I click "Change my password" button
|
2017-09-01 15:24:36 +08:00
|
|
|
Then I should see "Password confirmation doesn't match Password" flash message
|