forked from refinery/refinerycms
/
lost_password.feature
49 lines (43 loc) · 2.07 KB
/
lost_password.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@refinerycms @authentication @users @users-password
Feature: Lost Password
In order to restore my password
As a lost soul
I want to reset my password
Background:
Given A Refinery user exists
@users-password-forgot
Scenario: Forgot Password page (no email entered)
And I am on the forgot password page
When I press "Reset password"
Then I should see "You did not enter an email address."
@users-password-forgot
Scenario: Forgot Password page (non existing email entered)
Given I am on the forgot password page
And I have a user with email "green@cukes.com"
When I fill in "user_email" with "none@cukes.com"
And I press "Reset password"
Then I should see "Sorry, 'none@cukes.com' isn't associated with any accounts."
And I should see "Are you sure you typed the correct email address?"
@users-password-forgot
Scenario: Forgot Password page (existing email entered)
Given I am on the forgot password page
And I have a user with email "green@cukes.com"
When I fill in "user_email" with "green@cukes.com"
And I press "Reset password"
Then I should see "An email has been sent to you with a link to reset your password."
@users-password-reset
Scenario: Reset password page (invalid reset_code)
Given I am not requesting password reset
When I go to the reset password page
Then I should be on the forgot password page
And I should see "We're sorry, but this reset code has expired or is invalid."
And I should see "If you are having issues try copying and pasting the URL from your email into your browser or restarting the reset password process."
@users-password-reset
Scenario: Reset password page (valid reset_code)
Given I am requesting password reset
When I go to the reset password page
And I fill in "Password" with "cukes"
And I fill in "Password confirmation" with "cukes"
And I press "Reset password"
Then I should be on the admin root
And I should see "Password reset successfully for"