login.feature
7.9 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
Feature: login
As a user
I want to login
In order to view pages logged in
Background:
Given the following users
| login | name |
| joaosilva | Joao Silva |
@selenium
Scenario: login from portal homepage
Given feature "allow_change_of_redirection_after_login" is disabled on environment
And I am not logged in
And I go to the homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on the homepage
And I should be logged in as "joaosilva"
@selenium
Scenario: login from some profile page
Given feature "allow_change_of_redirection_after_login" is disabled on environment
And I am not logged in
And the following users
| login | name |
| mariasilva | Maria Silva |
And the following articles
| owner | name | homepage |
| mariasilva | my home page | true |
And I go to mariasilva's homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on mariasilva's homepage
Scenario: view my control panel
Given feature "allow_change_of_redirection_after_login" is disabled on environment
And I am not logged in
And I go to joaosilva's control panel
And I should be on login page
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on joaosilva's control panel
Scenario: be redirected if user goes to login page and is logged
Given I am logged in as "joaosilva"
And I go to login page
Then I should be on joaosilva's control panel
@selenium
Scenario: stay on the same page after login if this is the environment default
Given feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to stay on the same page after login
And the following users
| login | name |
| mariasilva | Maria Silva |
And the following articles
| owner | name | homepage |
| mariasilva | my home page | true |
And I go to mariasilva's homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on mariasilva's homepage
@selenium
Scenario: go to site homepage if this is the environment default
Given feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to redirect to site homepage after login
And I go to joaosilva's homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on the homepage
@selenium
Scenario: go to user profile after login if this is the environment default
Given feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to redirect to user profile page after login
And I go to the homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on joaosilva's profile
@selenium
Scenario: go to profile homepage after login if this is the environment default
Given the following articles
| owner | name | body | homepage |
| joaosilva | Sample Article | This is an article | true |
And feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to redirect to profile homepage after login
And I go to the homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on joaosilva's homepage
@selenium
Scenario: go to profile control panel after login if this is the environment default
Given feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to redirect to profile control panel after login
And I go to the homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on joaosilva's control panel
@selenium
Scenario: stay on the same page after login if this is the profile default
Given feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to redirect to site homepage after login
And the profile joaosilva is configured to stay on the same page after login
And the following users
| login | name |
| mariasilva | Maria Silva |
And the following articles
| owner | name | homepage |
| mariasilva | my home page | true |
And I go to mariasilva's homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on mariasilva's homepage
@selenium
Scenario: go to site homepage if this is the profile default
Given feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to stay on the same page after login
And the profile joaosilva is configured to redirect to site homepage after login
And I go to joaosilva's homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on the homepage
@selenium
Scenario: go to user profile after login if this is the profile default
Given feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to stay on the same page after login
And the profile joaosilva is configured to redirect to user profile page after login
And I go to the homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on joaosilva's profile
@selenium
Scenario: go to profile homepage after login if this is the profile default
Given the following articles
| owner | name | body | homepage |
| joaosilva | Sample Article | This is an article | true |
And feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to stay on the same page after login
And the profile joaosilva is configured to redirect to profile homepage after login
And I go to the homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on joaosilva's homepage
@selenium
Scenario: go to profile control panel after login if this is the profile default
Given feature "allow_change_of_redirection_after_login" is enabled on environment
And I am not logged in
And the environment is configured to stay on the same page after login
And the profile joaosilva is configured to redirect to profile control panel after login
And I go to the homepage
And I follow "Login"
And I fill in the following:
| Username / Email | joaosilva |
| Password | 123456 |
When I press "Log in"
Then I should be on joaosilva's control panel