Commit c5c83bb1fb304133b1b50f7e1064f4eebe9c8451
1 parent
b0f3ebb9
Exists in
master
and in
1 other branch
users, features directories
Showing
10 changed files
with
126 additions
and
126 deletions
Show diff stats
features/password_reset.feature
@@ -1,33 +0,0 @@ | @@ -1,33 +0,0 @@ | ||
1 | -Feature: Password reset | ||
2 | - In order to sign in even if user forgot their password | ||
3 | - A user | ||
4 | - Should be able to reset it | ||
5 | - | ||
6 | - Scenario: User is not signed up | ||
7 | - Given no user exists with an email of "email@person.com" | ||
8 | - When I request password reset link to be sent to "email@person.com" | ||
9 | - Then I should see "Unknown email" | ||
10 | - | ||
11 | - Scenario: User is signed up and requests password reset | ||
12 | - Given I signed up with "email@person.com/password" | ||
13 | - When I request password reset link to be sent to "email@person.com" | ||
14 | - Then I should see "instructions for changing your password" | ||
15 | - And a password reset message should be sent to "email@person.com" | ||
16 | - | ||
17 | - Scenario: User is signed up updated his password and types wrong confirmation | ||
18 | - Given I signed up with "email@person.com/password" | ||
19 | - When I follow the password reset link sent to "email@person.com" | ||
20 | - And I update my password with "newpassword/wrongconfirmation" | ||
21 | - Then I should see error messages | ||
22 | - And I should be signed out | ||
23 | - | ||
24 | - Scenario: User is signed up and updates his password | ||
25 | - Given I signed up with "email@person.com/password" | ||
26 | - When I follow the password reset link sent to "email@person.com" | ||
27 | - And I update my password with "newpassword/newpassword" | ||
28 | - Then I should be signed in | ||
29 | - When I sign out | ||
30 | - Then I should be signed out | ||
31 | - And I sign in as "email@person.com/newpassword" | ||
32 | - Then I should be signed in | ||
33 | - |
features/sign_in.feature
@@ -1,42 +0,0 @@ | @@ -1,42 +0,0 @@ | ||
1 | -Feature: Sign in | ||
2 | - In order to get access to protected sections of the site | ||
3 | - A user | ||
4 | - Should be able to sign in | ||
5 | - | ||
6 | - Scenario: User is not signed up | ||
7 | - Given no user exists with an email of "email@person.com" | ||
8 | - When I go to the sign in page | ||
9 | - And I sign in as "email@person.com/password" | ||
10 | - Then I should see "Bad email or password" | ||
11 | - And I should be signed out | ||
12 | - | ||
13 | - Scenario: User is not confirmed | ||
14 | - Given I signed up with "email@person.com/password" | ||
15 | - When I go to the sign in page | ||
16 | - And I sign in as "email@person.com/password" | ||
17 | - Then I should see "User has not confirmed email" | ||
18 | - And I should be signed out | ||
19 | - | ||
20 | - Scenario: User enters wrong password | ||
21 | - Given I am signed up and confirmed as "email@person.com/password" | ||
22 | - When I go to the sign in page | ||
23 | - And I sign in as "email@person.com/wrongpassword" | ||
24 | - Then I should see "Bad email or password" | ||
25 | - And I should be signed out | ||
26 | - | ||
27 | - Scenario: User signs in successfully | ||
28 | - Given I am signed up and confirmed as "email@person.com/password" | ||
29 | - When I go to the sign in page | ||
30 | - And I sign in as "email@person.com/password" | ||
31 | - Then I should see "Signed in" | ||
32 | - And I should be signed in | ||
33 | - | ||
34 | - Scenario: User signs in and checks "remember me" | ||
35 | - Given I am signed up and confirmed as "email@person.com/password" | ||
36 | - When I go to the sign in page | ||
37 | - And I sign in with "remember me" as "email@person.com/password" | ||
38 | - Then I should see "Signed in" | ||
39 | - And I should be signed in | ||
40 | - When I return next time | ||
41 | - Then I should be signed in | ||
42 | - |
features/sign_out.feature
@@ -1,23 +0,0 @@ | @@ -1,23 +0,0 @@ | ||
1 | -Feature: Sign out | ||
2 | - To protect my account from unauthorized access | ||
3 | - A signed in user | ||
4 | - Should be able to sign out | ||
5 | - | ||
6 | - Scenario: User signs out | ||
7 | - Given I am signed up and confirmed as "email@person.com/password" | ||
8 | - When I sign in as "email@person.com/password" | ||
9 | - Then I should be signed in | ||
10 | - And I sign out | ||
11 | - Then I should see "Signed out" | ||
12 | - And I should be signed out | ||
13 | - | ||
14 | - Scenario: User who was remembered signs out | ||
15 | - Given I am signed up and confirmed as "email@person.com/password" | ||
16 | - When I sign in with "remember me" as "email@person.com/password" | ||
17 | - Then I should be signed in | ||
18 | - And I sign out | ||
19 | - Then I should see "Signed out" | ||
20 | - And I should be signed out | ||
21 | - When I return next time | ||
22 | - Then I should be signed out | ||
23 | - |
features/sign_up.feature
@@ -1,28 +0,0 @@ | @@ -1,28 +0,0 @@ | ||
1 | -Feature: Sign up | ||
2 | - In order to get access to protected sections of the site | ||
3 | - A user | ||
4 | - Should be able to sign up | ||
5 | - | ||
6 | - Scenario: User signs up with invalid data | ||
7 | - When I go to the sign up page | ||
8 | - And I fill in "Email" with "invalidemail" | ||
9 | - And I fill in "Password" with "password" | ||
10 | - And I fill in "Password confirmation" with "" | ||
11 | - And I press "Sign Up" | ||
12 | - Then I should see error messages | ||
13 | - | ||
14 | - Scenario: User signs up with valid data | ||
15 | - When I go to the sign up page | ||
16 | - And I fill in "Email" with "email@person.com" | ||
17 | - And I fill in "Password" with "password" | ||
18 | - And I fill in "Password confirmation" with "password" | ||
19 | - And I press "Sign Up" | ||
20 | - Then I should see "instructions for confirming" | ||
21 | - And a confirmation message should be sent to "email@person.com" | ||
22 | - | ||
23 | - Scenario: User confirms his account | ||
24 | - Given I signed up with "email@person.com/password" | ||
25 | - When I follow the confirmation link sent to "email@person.com" | ||
26 | - Then I should see "Confirmed email and signed in" | ||
27 | - And I should be signed in | ||
28 | - |
@@ -0,0 +1,33 @@ | @@ -0,0 +1,33 @@ | ||
1 | +Feature: Password reset | ||
2 | + In order to sign in even if user forgot their password | ||
3 | + A user | ||
4 | + Should be able to reset it | ||
5 | + | ||
6 | + Scenario: User is not signed up | ||
7 | + Given no user exists with an email of "email@person.com" | ||
8 | + When I request password reset link to be sent to "email@person.com" | ||
9 | + Then I should see "Unknown email" | ||
10 | + | ||
11 | + Scenario: User is signed up and requests password reset | ||
12 | + Given I signed up with "email@person.com/password" | ||
13 | + When I request password reset link to be sent to "email@person.com" | ||
14 | + Then I should see "instructions for changing your password" | ||
15 | + And a password reset message should be sent to "email@person.com" | ||
16 | + | ||
17 | + Scenario: User is signed up updated his password and types wrong confirmation | ||
18 | + Given I signed up with "email@person.com/password" | ||
19 | + When I follow the password reset link sent to "email@person.com" | ||
20 | + And I update my password with "newpassword/wrongconfirmation" | ||
21 | + Then I should see error messages | ||
22 | + And I should be signed out | ||
23 | + | ||
24 | + Scenario: User is signed up and updates his password | ||
25 | + Given I signed up with "email@person.com/password" | ||
26 | + When I follow the password reset link sent to "email@person.com" | ||
27 | + And I update my password with "newpassword/newpassword" | ||
28 | + Then I should be signed in | ||
29 | + When I sign out | ||
30 | + Then I should be signed out | ||
31 | + And I sign in as "email@person.com/newpassword" | ||
32 | + Then I should be signed in | ||
33 | + |
@@ -0,0 +1,42 @@ | @@ -0,0 +1,42 @@ | ||
1 | +Feature: Sign in | ||
2 | + In order to get access to protected sections of the site | ||
3 | + A user | ||
4 | + Should be able to sign in | ||
5 | + | ||
6 | + Scenario: User is not signed up | ||
7 | + Given no user exists with an email of "email@person.com" | ||
8 | + When I go to the sign in page | ||
9 | + And I sign in as "email@person.com/password" | ||
10 | + Then I should see "Bad email or password" | ||
11 | + And I should be signed out | ||
12 | + | ||
13 | + Scenario: User is not confirmed | ||
14 | + Given I signed up with "email@person.com/password" | ||
15 | + When I go to the sign in page | ||
16 | + And I sign in as "email@person.com/password" | ||
17 | + Then I should see "User has not confirmed email" | ||
18 | + And I should be signed out | ||
19 | + | ||
20 | + Scenario: User enters wrong password | ||
21 | + Given I am signed up and confirmed as "email@person.com/password" | ||
22 | + When I go to the sign in page | ||
23 | + And I sign in as "email@person.com/wrongpassword" | ||
24 | + Then I should see "Bad email or password" | ||
25 | + And I should be signed out | ||
26 | + | ||
27 | + Scenario: User signs in successfully | ||
28 | + Given I am signed up and confirmed as "email@person.com/password" | ||
29 | + When I go to the sign in page | ||
30 | + And I sign in as "email@person.com/password" | ||
31 | + Then I should see "Signed in" | ||
32 | + And I should be signed in | ||
33 | + | ||
34 | + Scenario: User signs in and checks "remember me" | ||
35 | + Given I am signed up and confirmed as "email@person.com/password" | ||
36 | + When I go to the sign in page | ||
37 | + And I sign in with "remember me" as "email@person.com/password" | ||
38 | + Then I should see "Signed in" | ||
39 | + And I should be signed in | ||
40 | + When I return next time | ||
41 | + Then I should be signed in | ||
42 | + |
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +Feature: Sign out | ||
2 | + To protect my account from unauthorized access | ||
3 | + A signed in user | ||
4 | + Should be able to sign out | ||
5 | + | ||
6 | + Scenario: User signs out | ||
7 | + Given I am signed up and confirmed as "email@person.com/password" | ||
8 | + When I sign in as "email@person.com/password" | ||
9 | + Then I should be signed in | ||
10 | + And I sign out | ||
11 | + Then I should see "Signed out" | ||
12 | + And I should be signed out | ||
13 | + | ||
14 | + Scenario: User who was remembered signs out | ||
15 | + Given I am signed up and confirmed as "email@person.com/password" | ||
16 | + When I sign in with "remember me" as "email@person.com/password" | ||
17 | + Then I should be signed in | ||
18 | + And I sign out | ||
19 | + Then I should see "Signed out" | ||
20 | + And I should be signed out | ||
21 | + When I return next time | ||
22 | + Then I should be signed out | ||
23 | + |
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +Feature: Sign up | ||
2 | + In order to get access to protected sections of the site | ||
3 | + A user | ||
4 | + Should be able to sign up | ||
5 | + | ||
6 | + Scenario: User signs up with invalid data | ||
7 | + When I go to the sign up page | ||
8 | + And I fill in "Email" with "invalidemail" | ||
9 | + And I fill in "Password" with "password" | ||
10 | + And I fill in "Password confirmation" with "" | ||
11 | + And I press "Sign Up" | ||
12 | + Then I should see error messages | ||
13 | + | ||
14 | + Scenario: User signs up with valid data | ||
15 | + When I go to the sign up page | ||
16 | + And I fill in "Email" with "email@person.com" | ||
17 | + And I fill in "Password" with "password" | ||
18 | + And I fill in "Password confirmation" with "password" | ||
19 | + And I press "Sign Up" | ||
20 | + Then I should see "instructions for confirming" | ||
21 | + And a confirmation message should be sent to "email@person.com" | ||
22 | + | ||
23 | + Scenario: User confirms his account | ||
24 | + Given I signed up with "email@person.com/password" | ||
25 | + When I follow the confirmation link sent to "email@person.com" | ||
26 | + Then I should see "Confirmed email and signed in" | ||
27 | + And I should be signed in | ||
28 | + |