1 |
efrain |
1 |
@tool @tool_dataprivacy
|
|
|
2 |
Feature: Manage data requests
|
|
|
3 |
As the privacy officer
|
|
|
4 |
In order to address the privacy-related requests
|
|
|
5 |
I need to be able to manage the data requests of the site's users
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | John | Doe | s1@example.com |
|
|
|
11 |
| student2 | Jane | Doe | s2@example.com |
|
|
|
12 |
And the following config values are set as admin:
|
|
|
13 |
| contactdataprotectionofficer | 1 | tool_dataprivacy |
|
|
|
14 |
|
|
|
15 |
@javascript
|
|
|
16 |
Scenario: Marking general enquiries as complete
|
|
|
17 |
Given I log in as "student1"
|
|
|
18 |
And I follow "Profile" in the user menu
|
|
|
19 |
And I should see "Contact the privacy officer"
|
|
|
20 |
And I click on "Contact the privacy officer" "link"
|
|
|
21 |
And I set the field "Message" to "Hi PO! Can others access my information on your site?"
|
|
|
22 |
And I click on "Send" "button" in the "Contact the privacy officer" "dialogue"
|
|
|
23 |
And I should see "Your request has been submitted to the privacy officer"
|
|
|
24 |
And I log out
|
|
|
25 |
And I log in as "student2"
|
|
|
26 |
And I follow "Profile" in the user menu
|
|
|
27 |
And I click on "Contact the privacy officer" "link"
|
|
|
28 |
And I set the field "Message" to "Dear Mr. Privacy Officer, I'd like to know more about GDPR. Thanks!"
|
|
|
29 |
And I click on "Send" "button" in the "Contact the privacy officer" "dialogue"
|
|
|
30 |
And I should see "Your request has been submitted to the privacy officer"
|
|
|
31 |
And I log out
|
|
|
32 |
When I log in as "admin"
|
|
|
33 |
And I navigate to "Users > Privacy and policies > Data requests" in site administration
|
|
|
34 |
Then I should see "Hi PO!" in the "John Doe" "table_row"
|
|
|
35 |
And I should see "Dear Mr. Privacy Officer" in the "Jane Doe" "table_row"
|
|
|
36 |
And I open the action menu in "John Doe" "table_row"
|
|
|
37 |
And I should see "View the request"
|
|
|
38 |
And I should see "Mark as complete"
|
|
|
39 |
And I choose "View the request" in the open action menu
|
|
|
40 |
And I should see "Hi PO! Can others access my information on your site?"
|
|
|
41 |
And I press "Mark as complete"
|
|
|
42 |
And I wait until the page is ready
|
|
|
43 |
And I should see "Complete" in the "John Doe" "table_row"
|
|
|
44 |
And I open the action menu in "John Doe" "table_row"
|
|
|
45 |
And I should see "View the request"
|
|
|
46 |
But I should not see "Mark as complete"
|
|
|
47 |
And I press the escape key
|
|
|
48 |
And I open the action menu in "Jane Doe" "table_row"
|
|
|
49 |
And I choose "Mark as complete" in the open action menu
|
|
|
50 |
And I should see "Do you really want to mark this user enquiry as complete?"
|
|
|
51 |
And I press "Mark as complete"
|
|
|
52 |
And I wait until the page is ready
|
|
|
53 |
And I should see "Complete" in the "Jane Doe" "table_row"
|
|
|
54 |
And I open the action menu in "Jane Doe" "table_row"
|
|
|
55 |
And I should see "View the request"
|
|
|
56 |
But I should not see "Mark as complete"
|
|
|
57 |
|
|
|
58 |
@javascript
|
|
|
59 |
Scenario: Bulk accepting requests
|
|
|
60 |
Given I log in as "student1"
|
|
|
61 |
And I follow "Profile" in the user menu
|
|
|
62 |
And I should see "Data requests"
|
|
|
63 |
And I click on "Data requests" "link"
|
|
|
64 |
And I should see "New request"
|
|
|
65 |
And I click on "New request" "link"
|
|
|
66 |
And I should see "Type"
|
|
|
67 |
And I should see "Comments"
|
|
|
68 |
And I set the field "Type" to "Export all of my personal data"
|
|
|
69 |
And I set the field "Comments" to "Comment1"
|
|
|
70 |
And I press "Save changes"
|
|
|
71 |
And I should see "Your request has been submitted to the privacy officer"
|
|
|
72 |
And I log out
|
|
|
73 |
And I log in as "student2"
|
|
|
74 |
And I follow "Profile" in the user menu
|
|
|
75 |
And I should see "Data requests"
|
|
|
76 |
And I click on "Data requests" "link"
|
|
|
77 |
And I should see "New request"
|
|
|
78 |
And I click on "New request" "link"
|
|
|
79 |
And I should see "Type"
|
|
|
80 |
And I should see "Comments"
|
|
|
81 |
And I set the field "Type" to "Export all of my personal data"
|
|
|
82 |
And I set the field "Comments" to "Comment2"
|
|
|
83 |
And I press "Save changes"
|
|
|
84 |
And I should see "Your request has been submitted to the privacy officer"
|
|
|
85 |
And I log out
|
|
|
86 |
And I trigger cron
|
|
|
87 |
And I log in as "admin"
|
|
|
88 |
And I navigate to "Users > Privacy and policies > Data requests" in site administration
|
|
|
89 |
And I should see "Comment1" in the "John Doe" "table_row"
|
|
|
90 |
And I should see "Awaiting approval" in the "John Doe" "table_row"
|
|
|
91 |
And I should see "Comment2" in the "Jane Doe" "table_row"
|
|
|
92 |
And I should see "Awaiting approval" in the "Jane Doe" "table_row"
|
|
|
93 |
And I click on ".selectrequests" "css_element" in the "John Doe" "table_row"
|
|
|
94 |
And I click on ".selectrequests" "css_element" in the "Jane Doe" "table_row"
|
|
|
95 |
And I set the field with xpath "//select[@id='bulk-action']" to "Approve"
|
|
|
96 |
And I press "Confirm"
|
|
|
97 |
And I should see "Approve requests"
|
|
|
98 |
And I should see "Do you really want to bulk approve the selected data requests?"
|
|
|
99 |
When I press "Approve requests"
|
|
|
100 |
Then I should see "Approved" in the "John Doe" "table_row"
|
|
|
101 |
And I should see "Approved" in the "Jane Doe" "table_row"
|
|
|
102 |
|
|
|
103 |
@javascript
|
|
|
104 |
Scenario: Bulk denying requests
|
|
|
105 |
Given I log in as "student1"
|
|
|
106 |
And I follow "Profile" in the user menu
|
|
|
107 |
And I should see "Data requests"
|
|
|
108 |
And I click on "Data requests" "link"
|
|
|
109 |
And I should see "New request"
|
|
|
110 |
And I click on "New request" "link"
|
|
|
111 |
And I should see "Type"
|
|
|
112 |
And I should see "Comments"
|
|
|
113 |
And I set the field "Type" to "Export all of my personal data"
|
|
|
114 |
And I set the field "Comments" to "Comment1"
|
|
|
115 |
And I press "Save changes"
|
|
|
116 |
And I should see "Your request has been submitted to the privacy officer"
|
|
|
117 |
And I log out
|
|
|
118 |
And I log in as "student2"
|
|
|
119 |
And I follow "Profile" in the user menu
|
|
|
120 |
And I should see "Data requests"
|
|
|
121 |
And I click on "Data requests" "link"
|
|
|
122 |
And I should see "New request"
|
|
|
123 |
And I click on "New request" "link"
|
|
|
124 |
And I should see "Type"
|
|
|
125 |
And I should see "Comments"
|
|
|
126 |
And I set the field "Type" to "Export all of my personal data"
|
|
|
127 |
And I set the field "Comments" to "Comment2"
|
|
|
128 |
And I press "Save changes"
|
|
|
129 |
And I should see "Your request has been submitted to the privacy officer"
|
|
|
130 |
And I log out
|
|
|
131 |
And I trigger cron
|
|
|
132 |
And I log in as "admin"
|
|
|
133 |
And I navigate to "Users > Privacy and policies > Data requests" in site administration
|
|
|
134 |
And I should see "Comment1" in the "John Doe" "table_row"
|
|
|
135 |
And I should see "Awaiting approval" in the "John Doe" "table_row"
|
|
|
136 |
And I should see "Comment2" in the "Jane Doe" "table_row"
|
|
|
137 |
And I should see "Awaiting approval" in the "Jane Doe" "table_row"
|
|
|
138 |
And I click on ".selectrequests" "css_element" in the "John Doe" "table_row"
|
|
|
139 |
And I click on ".selectrequests" "css_element" in the "Jane Doe" "table_row"
|
|
|
140 |
And I set the field with xpath "//select[@id='bulk-action']" to "Deny"
|
|
|
141 |
And I press "Confirm"
|
|
|
142 |
And I should see "Deny requests"
|
|
|
143 |
And I should see "Do you really want to bulk deny the selected data requests?"
|
|
|
144 |
When I press "Deny requests"
|
|
|
145 |
Then I should see "Rejected" in the "John Doe" "table_row"
|
|
|
146 |
And I should see "Rejected" in the "Jane Doe" "table_row"
|