1 |
efrain |
1 |
@tool @tool_dataprivacy @javascript
|
|
|
2 |
Feature: Manage data registry defaults
|
|
|
3 |
As the privacy officer
|
|
|
4 |
In order to manage the data registry
|
|
|
5 |
I need to be able to manage the default data categories and data storage purposes for various context levels.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given I log in as "admin"
|
|
|
9 |
And the following "categories" exist:
|
|
|
10 |
| name | idnumber | category |
|
|
|
11 |
| Science and technology | scitech | |
|
|
|
12 |
| Physics | st-phys | scitech |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname | category |
|
|
|
15 |
| Fundamentals of physics 1 | Physics 101 | st-phys |
|
|
|
16 |
And the following "activities" exist:
|
|
|
17 |
| activity | name | idnumber | course |
|
|
|
18 |
| assign | Assignment 1 | assign1 | Physics 101 |
|
|
|
19 |
| forum | Forum 1 | forum1 | Physics 101 |
|
|
|
20 |
And the following "blocks" exist:
|
|
|
21 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
22 |
| online_users | Course | Physics 101 | course-view-* | site-post |
|
|
|
23 |
And the following data privacy "categories" exist:
|
|
|
24 |
| name |
|
|
|
25 |
| Site category |
|
|
|
26 |
| Category 1 |
|
|
|
27 |
| Category 2 |
|
|
|
28 |
And the following data privacy "purposes" exist:
|
|
|
29 |
| name | retentionperiod |
|
|
|
30 |
| Site purpose | P10Y |
|
|
|
31 |
| Purpose 1 | P3Y |
|
|
|
32 |
| Purpose 2 | P5Y |
|
|
|
33 |
And I set the site category and purpose to "Site category" and "Site purpose"
|
|
|
34 |
|
|
|
35 |
# Setting a default for course categories should apply to everything beneath that category.
|
|
|
36 |
Scenario: Set course category data registry defaults
|
|
|
37 |
Given I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
38 |
And I click on "Set defaults" "link"
|
|
|
39 |
And I should see "Inherit"
|
|
|
40 |
And I press "Edit"
|
|
|
41 |
And I set the field "Category" to "Category 1"
|
|
|
42 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
43 |
When I press "Save changes"
|
|
|
44 |
Then I should see "Category 1"
|
|
|
45 |
And I should see "Purpose 1"
|
|
|
46 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
47 |
And I click on "Science and technology" "link"
|
|
|
48 |
And I wait until the page is ready
|
|
|
49 |
And the field "categoryid" matches value "Not set (use the default value)"
|
|
|
50 |
And the field "purposeid" matches value "Not set (use the default value)"
|
|
|
51 |
And I should see "3 years"
|
|
|
52 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
53 |
And I wait until the page is ready
|
|
|
54 |
And I click on "Physics 101" "link"
|
|
|
55 |
And I wait until the page is ready
|
|
|
56 |
And I should see "3 years"
|
|
|
57 |
And I click on "Activities and resources" "link"
|
|
|
58 |
And I wait until the page is ready
|
|
|
59 |
And I should see "3 years"
|
|
|
60 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
61 |
And I wait until the page is ready
|
|
|
62 |
And I should see "3 years"
|
|
|
63 |
|
|
|
64 |
# When Setting a default for course categories, and overriding a specific category, only that category and its
|
|
|
65 |
# children will be overridden.
|
|
|
66 |
# If any child is a course category, it will get the default.
|
|
|
67 |
Scenario: Set course category data registry defaults with override
|
|
|
68 |
Given I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
69 |
And I click on "Set defaults" "link"
|
|
|
70 |
And I press "Edit"
|
|
|
71 |
And I set the field "Category" to "Category 1"
|
|
|
72 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
73 |
And I press "Save changes"
|
|
|
74 |
And I should see "Category 1"
|
|
|
75 |
And I should see "Purpose 1"
|
|
|
76 |
And I set the category and purpose for the course category "scitech" to "Category 2" and "Purpose 2"
|
|
|
77 |
When I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
78 |
And I click on "Science and technology" "link"
|
|
|
79 |
And I wait until the page is ready
|
|
|
80 |
Then the field "categoryid" matches value "Category 2"
|
|
|
81 |
And the field "purposeid" matches value "Purpose 2"
|
|
|
82 |
And I should see "5 years"
|
|
|
83 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
84 |
And I wait until the page is ready
|
|
|
85 |
# Physics 101 is also a category, so it will get the category default.
|
|
|
86 |
And I click on "Physics 101" "link"
|
|
|
87 |
And I wait until the page is ready
|
|
|
88 |
And I should see "3 years"
|
|
|
89 |
And I click on "Activities and resources" "link"
|
|
|
90 |
And I wait until the page is ready
|
|
|
91 |
And I should see "3 years"
|
|
|
92 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
93 |
And I wait until the page is ready
|
|
|
94 |
And I should see "3 years"
|
|
|
95 |
|
|
|
96 |
# When overriding a specific category, only that category and its children will be overridden.
|
|
|
97 |
Scenario: Set course category data registry defaults with override
|
|
|
98 |
Given I set the category and purpose for the course category "scitech" to "Category 2" and "Purpose 2"
|
|
|
99 |
When I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
100 |
And I click on "Science and technology" "link"
|
|
|
101 |
And I wait until the page is ready
|
|
|
102 |
Then the field "categoryid" matches value "Category 2"
|
|
|
103 |
And the field "purposeid" matches value "Purpose 2"
|
|
|
104 |
And I should see "5 years"
|
|
|
105 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
106 |
And I wait until the page is ready
|
|
|
107 |
# Physics 101 is also a category, so it will get the category default.
|
|
|
108 |
And I click on "Physics 101" "link"
|
|
|
109 |
And I wait until the page is ready
|
|
|
110 |
And I should see "5 years"
|
|
|
111 |
And I click on "Activities and resources" "link"
|
|
|
112 |
And I wait until the page is ready
|
|
|
113 |
And I should see "5 years"
|
|
|
114 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
115 |
And I wait until the page is ready
|
|
|
116 |
And I should see "5 years"
|
|
|
117 |
|
|
|
118 |
# Resetting instances removes custom values.
|
|
|
119 |
Scenario: Set course category data registry defaults with override
|
|
|
120 |
Given I set the category and purpose for the course category "scitech" to "Category 2" and "Purpose 2"
|
|
|
121 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
122 |
And I click on "Set defaults" "link"
|
|
|
123 |
And I press "Edit"
|
|
|
124 |
And I set the field "Category" to "Category 1"
|
|
|
125 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
126 |
When I click on "Reset instances with custom values" "checkbox"
|
|
|
127 |
And I press "Save changes"
|
|
|
128 |
And I should see "Category 1"
|
|
|
129 |
And I should see "Purpose 1"
|
|
|
130 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
131 |
And I click on "Science and technology" "link"
|
|
|
132 |
And I wait until the page is ready
|
|
|
133 |
Then the field "categoryid" matches value "Not set (use the default value)"
|
|
|
134 |
And the field "purposeid" matches value "Not set (use the default value)"
|
|
|
135 |
And I should see "3 years"
|
|
|
136 |
|
|
|
137 |
Scenario: Set course data registry defaults
|
|
|
138 |
Given I set the category and purpose for the course "Physics 101" to "Category 2" and "Purpose 2"
|
|
|
139 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
140 |
And I click on "Set defaults" "link"
|
|
|
141 |
And I click on "Courses" "link" in the "#region-main" "css_element"
|
|
|
142 |
And I should see "Inherit"
|
|
|
143 |
And I should not see "Add a new module default"
|
|
|
144 |
And I press "Edit"
|
|
|
145 |
And I set the field "Category" to "Category 1"
|
|
|
146 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
147 |
When I press "Save changes"
|
|
|
148 |
Then I should see "Category 1"
|
|
|
149 |
And I should see "Purpose 1"
|
|
|
150 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
151 |
And I click on "Science and technology" "link"
|
|
|
152 |
And I wait until the page is ready
|
|
|
153 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
154 |
And I wait until the page is ready
|
|
|
155 |
And I click on "Physics 101" "link"
|
|
|
156 |
And I wait until the page is ready
|
|
|
157 |
And the field "categoryid" matches value "Category 2"
|
|
|
158 |
And the field "purposeid" matches value "Purpose 2"
|
|
|
159 |
And I should see "5 years (after the course end date)"
|
|
|
160 |
And I click on "Activities and resources" "link"
|
|
|
161 |
And I wait until the page is ready
|
|
|
162 |
And I should see "5 years"
|
|
|
163 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
164 |
And I wait until the page is ready
|
|
|
165 |
And I should see "5 years"
|
|
|
166 |
|
|
|
167 |
Scenario: Set course data registry defaults with override
|
|
|
168 |
Given I set the category and purpose for the course "Physics 101" to "Category 2" and "Purpose 2"
|
|
|
169 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
170 |
And I click on "Set defaults" "link"
|
|
|
171 |
And I click on "Courses" "link" in the "#region-main" "css_element"
|
|
|
172 |
And I should see "Inherit"
|
|
|
173 |
And I should not see "Add a new module default"
|
|
|
174 |
And I press "Edit"
|
|
|
175 |
And I set the field "Category" to "Category 1"
|
|
|
176 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
177 |
And I click on "Reset instances with custom values" "checkbox"
|
|
|
178 |
When I press "Save changes"
|
|
|
179 |
Then I should see "Category 1"
|
|
|
180 |
And I should see "Purpose 1"
|
|
|
181 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
182 |
And I click on "Science and technology" "link"
|
|
|
183 |
And I wait until the page is ready
|
|
|
184 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
185 |
And I wait until the page is ready
|
|
|
186 |
And I click on "Physics 101" "link"
|
|
|
187 |
And I wait until the page is ready
|
|
|
188 |
And the field "categoryid" matches value "Not set (use the default value)"
|
|
|
189 |
And the field "purposeid" matches value "Not set (use the default value)"
|
|
|
190 |
And I should see "3 years (after the course end date)"
|
|
|
191 |
And I click on "Activities and resources" "link"
|
|
|
192 |
And I wait until the page is ready
|
|
|
193 |
And I should see "3 years"
|
|
|
194 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
195 |
And I wait until the page is ready
|
|
|
196 |
And I should see "3 years"
|
|
|
197 |
|
|
|
198 |
Scenario: Set module level data registry defaults
|
|
|
199 |
Given I set the category and purpose for the "assign1" "assign" in course "Physics 101" to "Category 2" and "Purpose 2"
|
|
|
200 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
201 |
And I click on "Set defaults" "link"
|
|
|
202 |
And I click on "Activity modules" "link"
|
|
|
203 |
And I should see "Inherit"
|
|
|
204 |
And I should see "Add a new module default"
|
|
|
205 |
And I press "Edit"
|
|
|
206 |
And I set the field "Category" to "Category 1"
|
|
|
207 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
208 |
When I press "Save changes"
|
|
|
209 |
Then I should see "Category 1"
|
|
|
210 |
And I should see "Purpose 1"
|
|
|
211 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
212 |
And I click on "Science and technology" "link"
|
|
|
213 |
And I wait until the page is ready
|
|
|
214 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
215 |
And I wait until the page is ready
|
|
|
216 |
And I click on "Physics 101" "link"
|
|
|
217 |
And I wait until the page is ready
|
|
|
218 |
And I click on "Activities and resources" "link"
|
|
|
219 |
And I wait until the page is ready
|
|
|
220 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
221 |
And I wait until the page is ready
|
|
|
222 |
And the field "categoryid" matches value "Category 2"
|
|
|
223 |
And the field "purposeid" matches value "Purpose 2"
|
|
|
224 |
And I should see "5 years (after the course end date)"
|
|
|
225 |
|
|
|
226 |
Scenario: Set module level data registry defaults with override
|
|
|
227 |
Given I set the category and purpose for the "assign1" "assign" in course "Physics 101" to "Category 2" and "Purpose 2"
|
|
|
228 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
229 |
And I click on "Set defaults" "link"
|
|
|
230 |
And I click on "Activity modules" "link"
|
|
|
231 |
And I should see "Inherit"
|
|
|
232 |
And I should see "Add a new module default"
|
|
|
233 |
And I press "Edit"
|
|
|
234 |
And I set the field "Category" to "Category 1"
|
|
|
235 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
236 |
And I click on "Reset instances with custom values" "checkbox"
|
|
|
237 |
When I press "Save changes"
|
|
|
238 |
Then I should see "Category 1"
|
|
|
239 |
And I should see "Purpose 1"
|
|
|
240 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
241 |
And I click on "Science and technology" "link"
|
|
|
242 |
And I wait until the page is ready
|
|
|
243 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
244 |
And I wait until the page is ready
|
|
|
245 |
And I click on "Physics 101" "link"
|
|
|
246 |
And I wait until the page is ready
|
|
|
247 |
And I click on "Activities and resources" "link"
|
|
|
248 |
And I wait until the page is ready
|
|
|
249 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
250 |
And I wait until the page is ready
|
|
|
251 |
And the field "categoryid" matches value "Not set (use the default value)"
|
|
|
252 |
And the field "purposeid" matches value "Not set (use the default value)"
|
|
|
253 |
And I click on "Forum 1 (Forum)" "link"
|
|
|
254 |
And I wait until the page is ready
|
|
|
255 |
And the field "categoryid" matches value "Not set (use the default value)"
|
|
|
256 |
And the field "purposeid" matches value "Not set (use the default value)"
|
|
|
257 |
And I should see "3 years (after the course end date)"
|
|
|
258 |
|
|
|
259 |
Scenario: Set data registry defaults for an activity module
|
|
|
260 |
Given I set the category and purpose for the "assign1" "assign" in course "Physics 101" to "Category 2" and "Purpose 2"
|
|
|
261 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
262 |
And I click on "Set defaults" "link"
|
|
|
263 |
And I click on "Activity modules" "link"
|
|
|
264 |
And I should see "Inherit"
|
|
|
265 |
And I should see "Add a new module default"
|
|
|
266 |
And I press "Add a new module default"
|
|
|
267 |
And I set the field "Activity module" to "Assignment"
|
|
|
268 |
And I set the field "Category" to "Category 1"
|
|
|
269 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
270 |
When I press "Save changes"
|
|
|
271 |
Then I should see "Category 1" in the "Assignment" "table_row"
|
|
|
272 |
And I should see "Purpose 1" in the "Assignment" "table_row"
|
|
|
273 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
274 |
And I click on "Science and technology" "link"
|
|
|
275 |
And I wait until the page is ready
|
|
|
276 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
277 |
And I wait until the page is ready
|
|
|
278 |
And I click on "Physics 101" "link"
|
|
|
279 |
And I wait until the page is ready
|
|
|
280 |
And I click on "Activities and resources" "link"
|
|
|
281 |
And I wait until the page is ready
|
|
|
282 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
283 |
And I wait until the page is ready
|
|
|
284 |
And the field "categoryid" matches value "Category 2"
|
|
|
285 |
And the field "purposeid" matches value "Purpose 2"
|
|
|
286 |
And I should see "5 years (after the course end date)"
|
|
|
287 |
|
|
|
288 |
Scenario: Set data registry defaults for an activity module with override
|
|
|
289 |
Given I set the category and purpose for the "assign1" "assign" in course "Physics 101" to "Category 2" and "Purpose 2"
|
|
|
290 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
291 |
And I click on "Set defaults" "link"
|
|
|
292 |
And I click on "Activity modules" "link"
|
|
|
293 |
And I should see "Inherit"
|
|
|
294 |
And I should see "Add a new module default"
|
|
|
295 |
And I press "Add a new module default"
|
|
|
296 |
And I set the field "Activity module" to "Assignment"
|
|
|
297 |
And I set the field "Category" to "Category 1"
|
|
|
298 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
299 |
And I click on "Reset instances with custom values" "checkbox"
|
|
|
300 |
When I press "Save changes"
|
|
|
301 |
Then I should see "Category 1" in the "Assignment" "table_row"
|
|
|
302 |
And I should see "Purpose 1" in the "Assignment" "table_row"
|
|
|
303 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
304 |
And I click on "Science and technology" "link"
|
|
|
305 |
And I wait until the page is ready
|
|
|
306 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
307 |
And I wait until the page is ready
|
|
|
308 |
And I click on "Physics 101" "link"
|
|
|
309 |
And I wait until the page is ready
|
|
|
310 |
And I click on "Activities and resources" "link"
|
|
|
311 |
And I wait until the page is ready
|
|
|
312 |
And I click on "Assignment 1 (Assignment)" "link"
|
|
|
313 |
And I wait until the page is ready
|
|
|
314 |
And the field "categoryid" matches value "Not set (use the default value)"
|
|
|
315 |
And the field "purposeid" matches value "Not set (use the default value)"
|
|
|
316 |
And I should see "3 years (after the course end date)"
|
|
|
317 |
|
|
|
318 |
Scenario: Set block category data registry defaults
|
|
|
319 |
Given I set the category and purpose for the "online_users" block in the "Physics 101" course to "Category 2" and "Purpose 2"
|
|
|
320 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
321 |
And I click on "Set defaults" "link"
|
|
|
322 |
And I click on "Blocks" "link"
|
|
|
323 |
And I should see "Inherit"
|
|
|
324 |
And I should not see "Add a new module default"
|
|
|
325 |
And I press "Edit"
|
|
|
326 |
And I set the field "Category" to "Category 1"
|
|
|
327 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
328 |
When I press "Save changes"
|
|
|
329 |
Then I should see "Category 1"
|
|
|
330 |
And I should see "Purpose 1"
|
|
|
331 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
332 |
And I click on "Science and technology" "link"
|
|
|
333 |
And I wait until the page is ready
|
|
|
334 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
335 |
And I wait until the page is ready
|
|
|
336 |
And I click on "Physics 101" "link"
|
|
|
337 |
And I wait until the page is ready
|
|
|
338 |
And I click on "Blocks" "link"
|
|
|
339 |
And I wait until the page is ready
|
|
|
340 |
And I click on "Online users" "link"
|
|
|
341 |
And I wait until the page is ready
|
|
|
342 |
And the field "categoryid" matches value "Category 2"
|
|
|
343 |
And the field "purposeid" matches value "Purpose 2"
|
|
|
344 |
And I should see "5 years (after the course end date)"
|
|
|
345 |
|
|
|
346 |
Scenario: Set course category data registry defaults with override
|
|
|
347 |
Given I set the category and purpose for the "online_users" block in the "Physics 101" course to "Category 2" and "Purpose 2"
|
|
|
348 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
349 |
And I click on "Set defaults" "link"
|
|
|
350 |
And I click on "Blocks" "link"
|
|
|
351 |
And I should see "Inherit"
|
|
|
352 |
And I should not see "Add a new module default"
|
|
|
353 |
And I press "Edit"
|
|
|
354 |
And I set the field "Category" to "Category 1"
|
|
|
355 |
And I set the field "Purpose" to "Purpose 1"
|
|
|
356 |
And I click on "Reset instances with custom values" "checkbox"
|
|
|
357 |
When I press "Save changes"
|
|
|
358 |
Then I should see "Category 1"
|
|
|
359 |
And I should see "Purpose 1"
|
|
|
360 |
And I navigate to "Users > Privacy and policies > Data registry" in site administration
|
|
|
361 |
And I click on "Science and technology" "link"
|
|
|
362 |
And I wait until the page is ready
|
|
|
363 |
And I click on "Courses" "link" in the ".data-registry" "css_element"
|
|
|
364 |
And I wait until the page is ready
|
|
|
365 |
And I click on "Physics 101" "link"
|
|
|
366 |
And I wait until the page is ready
|
|
|
367 |
And I click on "Blocks" "link"
|
|
|
368 |
And I wait until the page is ready
|
|
|
369 |
And I click on "Online users" "link"
|
|
|
370 |
And I wait until the page is ready
|
|
|
371 |
And the field "categoryid" matches value "Not set (use the default value)"
|
|
|
372 |
And the field "purposeid" matches value "Not set (use the default value)"
|
|
|
373 |
And I should see "3 years (after the course end date)"
|