forked from ec-europa/joinup-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthentication.feature
More file actions
199 lines (182 loc) · 9.41 KB
/
authentication.feature
File metadata and controls
199 lines (182 loc) · 9.41 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
Feature: User authentication
In order to protect the integrity of the website
As a product owner
I want to make sure users with various roles can only access pages they are authorized to
Scenario: Anonymous user can see the user login page
Given I am not logged in
When I visit "user"
Then I should see the text "Sign in"
And I should see the text "Reset your password"
And I should see the text "Email or username"
And I should see the text "Password"
But I should not see the text "Sign out"
And I should not see the text "My account"
Scenario Outline: Anonymous user can access public pages
Given I am not logged in
Then I visit "<path>"
Examples:
| path |
| collections |
| user/login |
| user/password |
| user/register |
| joinup/legal-notice |
Scenario Outline: Anonymous user cannot access restricted pages
Given I am not logged in
When I go to "<path>"
Then I should see the error message "Access denied. You must sign in to view this page."
Examples:
| path |
| admin |
| admin/config |
| admin/config/search/redirect |
| admin/content |
| admin/content/rdf |
| admin/people |
| admin/reporting/group-administrators/rdf_entity/collection |
| admin/reporting/group-administrators/rdf_entity/collection/csv |
| admin/structure |
| admin/structure/views |
| propose/collection |
| propose/solution |
| dashboard |
| node |
| node/add |
| node/add/custom_page |
| node/add/discussion |
| node/add/document |
| node/add/event |
| node/add/news |
| rdf_entity/add |
| rdf_entity/add/asset_distribution |
| rdf_entity/add/asset_release |
| rdf_entity/add/collection |
| rdf_entity/add/contact_information |
| rdf_entity/add/licence |
| rdf_entity/add/owner |
| rdf_entity/add/solution |
| licence |
@api
Scenario Outline: Authenticated user can access pages they are authorized to
Given I am logged in as a user with the "authenticated" role
Then I visit "<path>"
Examples:
| path |
| propose/collection |
| collections |
| user |
| joinup/legal-notice |
@api
Scenario Outline: Authenticated user cannot access site administration
Given I am logged in as a user with the "authenticated" role
When I go to "<path>"
Then I should get an access denied error
Examples:
| path |
| admin |
| admin/config |
| admin/content |
| admin/content/rdf |
| admin/people |
| admin/reporting/group-administrators/rdf_entity/collection |
| admin/reporting/group-administrators/rdf_entity/collection/csv |
| admin/structure |
| admin/structure/views |
| dashboard |
| propose/solution |
| licence |
| licence/add |
| node |
| node/add |
| node/add/custom_page |
| node/add/discussion |
| node/add/document |
| node/add/event |
| node/add/news |
| rdf_entity/add |
| rdf_entity/add/asset_distribution |
| rdf_entity/add/asset_release |
| rdf_entity/add/collection |
| rdf_entity/add/contact_information |
| rdf_entity/add/licence |
| rdf_entity/add/owner |
| rdf_entity/add/solution |
@api
Scenario Outline: Moderator can access pages they are authorized to
Given I am logged in as a user with the "moderator" role
Then I visit "<path>"
Examples:
| path |
| admin/people |
| admin/content/rdf |
| admin/reporting/group-administrators/rdf_entity/collection |
| admin/reporting/group-administrators/rdf_entity/collection/csv |
| dashboard |
| licence |
| licence/add |
| propose/collection |
@api
Scenario Outline: Moderator cannot access restricted pages
Given I am logged in as a user with the "moderator" role
When I go to "<path>"
Then I should get an access denied error
Examples:
| path |
| admin |
| admin/config |
| admin/config/search/redirect |
| admin/content |
| admin/structure |
| admin/structure/views |
| propose/solution |
| node |
| node/add |
| node/add/custom_page |
| node/add/discussion |
| node/add/document |
| node/add/event |
| node/add/news |
| rdf_entity/add |
| rdf_entity/add/asset_distribution |
| rdf_entity/add/asset_release |
| rdf_entity/add/collection |
| rdf_entity/add/contact_information |
| rdf_entity/add/licence |
| rdf_entity/add/owner |
| rdf_entity/add/solution |
@api
Scenario Outline: Administrator can access pages they are authorized to
Given I am logged in as a user with the "administrator" role
Then I visit "<path>"
Examples:
| path |
| admin/config/search/redirect |
| collections |
@api
Scenario Outline: Administrator cannot access pages intended for site building and development
Given I am logged in as a user with the "administrator" role
When I go to "<path>"
Then I should get an access denied error
Examples:
| path |
| admin |
| admin/config |
| admin/content |
| admin/content/rdf |
| admin/people |
| admin/structure |
| node |
| node/add |
| node/add/custom_page |
| node/add/discussion |
| node/add/document |
| node/add/event |
| node/add/news |
| rdf_entity/add |
| rdf_entity/add/asset_distribution |
| rdf_entity/add/asset_release |
| rdf_entity/add/collection |
| rdf_entity/add/contact_information |
| rdf_entity/add/licence |
| rdf_entity/add/owner |
| rdf_entity/add/solution |