signup.feature
5.82 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Feature: signup
As a new user
I want to sign up to the site
So I can have fun using its features
@selenium
Scenario: successfull registration
Given I am on the homepage
When I follow "Login"
And I follow "New user"
And I fill in the following within ".no-boxes":
| e-Mail | josesilva@example.com |
| Username | josesilva |
| Password | secret |
| Password confirmation | secret |
| Full name | José da Silva |
And wait for the captcha signup time
And I press "Create my account"
Then I should receive an e-mail on josesilva@example.com
When I go to login page
And I fill in "Username" with "josesilva"
And I fill in "Password" with "secret"
And I press "Log in"
Then I should not be logged in as "josesilva"
When José da Silva's account is activated
And I go to login page
And I fill in "Username" with "josesilva"
And I fill in "Password" with "secret"
And I press "Log in"
Then I should be logged in as "josesilva"
Scenario: be redirected if user goes to signup page and is logged
Given the following users
| login | name |
| joaosilva | Joao Silva |
Given I am logged in as "joaosilva"
And I go to signup page
Then I should be on joaosilva's control panel
@selenium
Scenario: user cannot register without a name
Given I am on the homepage
And I follow "Login"
And I follow "New user"
And I fill in "e-Mail" with "josesilva@example.com"
And I fill in "Username" with "josesilva"
And I fill in "Password" with "secret"
And I fill in "Password confirmation" with "secret"
And wait for the captcha signup time
And I press "Create my account"
Then I should see "Name can't be blank"
Scenario: user cannot change his name to empty string
Given the following users
| login | name |
| joaosilva | Joao Silva |
Given I am logged in as "joaosilva"
And I am on joaosilva's control panel
And I follow "Edit Profile"
And I fill in "Name" with ""
When I press "Save"
Then I should see "Name can't be blank"
@selenium
Scenario: user should stay on same page after signup
Given the environment is configured to stay on the same page after signup
And feature "skip_new_user_email_confirmation" is enabled on environment
And I am on /search/people
When I follow "Sign up"
And I fill in the following within ".no-boxes":
| e-Mail | josesilva@example.com |
| Username | josesilva |
| Password | secret |
| Password confirmation | secret |
| Full name | José da Silva |
And wait for the captcha signup time
And I press "Create my account"
Then I should be on /search/people
@selenium
Scenario: user should go to his homepage after signup
Given the environment is configured to redirect to profile homepage after signup
And feature "skip_new_user_email_confirmation" is enabled on environment
And I am on /search/people
When I follow "Sign up"
And I fill in the following within ".no-boxes":
| e-Mail | josesilva@example.com |
| Username | josesilva |
| Password | secret |
| Password confirmation | secret |
| Full name | José da Silva |
And wait for the captcha signup time
And I press "Create my account"
Then I should be on josesilva's profile
@selenium
Scenario: user should go to his control panel after signup
Given the environment is configured to redirect to profile control panel after signup
And feature "skip_new_user_email_confirmation" is enabled on environment
And I am on /search/people
When I follow "Sign up"
And I fill in the following within ".no-boxes":
| e-Mail | josesilva@example.com |
| Username | josesilva |
| Password | secret |
| Password confirmation | secret |
| Full name | José da Silva |
And wait for the captcha signup time
And I press "Create my account"
Then I should be on josesilva's control panel
@selenium
Scenario: user should go to his profile page after signup
Given the environment is configured to redirect to profile page after signup
And feature "skip_new_user_email_confirmation" is enabled on environment
And I am on /search/people
When I follow "Sign up"
And I fill in the following within ".no-boxes":
| e-Mail | josesilva@example.com |
| Username | josesilva |
| Password | secret |
| Password confirmation | secret |
| Full name | José da Silva |
And wait for the captcha signup time
And I press "Create my account"
Then I should be on josesilva's profile
@selenium
Scenario: user should go to the environment's homepage after signup
Given the environment is configured to redirect to site homepage after signup
And feature "skip_new_user_email_confirmation" is enabled on environment
And I am on /search/people
When I follow "Sign up"
And I fill in the following within ".no-boxes":
| e-Mail | josesilva@example.com |
| Username | josesilva |
| Password | secret |
| Password confirmation | secret |
| Full name | José da Silva |
And wait for the captcha signup time
And I press "Create my account"
Then I should be on the homepage