-
Notifications
You must be signed in to change notification settings - Fork 168
/
user-consent.feature
116 lines (96 loc) · 4.77 KB
/
user-consent.feature
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
@api @gdpr @user-consent @DS-5586 @stability @stability-4
Feature: Give user consent
Benefit: So I can decide what to do with users personal data
Role: As a SM
Goal/desire: I want to know which users did (not) gave consent to the data policy
Scenario: Successfully view user consent
Given users:
| name | mail | status | roles |
| behatsitemanager | behatsitemanager@example.com | 1 | sitemanager |
| behatuser1 | behatuser1@example.com | 1 | |
| behatuser2 | behatuser2@example.com | 1 | |
| behatuser3 | behatuser3@example.com | 1 | |
Given I enable the module "social_gdpr"
Given I am logged in as "behatsitemanager" with the "without consent" permission
When I am on "admin/config/people/data-policy/settings"
Then I should see the heading "Data policy settings" in the "Admin page title block" region
And I should see checked the box "Enforce consent"
And I should see the text "A user should give your consent on data policy when he creates an account."
When I uncheck the box "Enforce consent"
And I press "Save configuration"
Then I should see the text "The configuration options have been saved."
And I should see unchecked the box "Enforce consent"
When I am on "admin/reports/data-policy-agreements"
Then I should see the heading "Data Policy Agreements" in the "Admin page title block" region
And I should see the text "Data policy revision"
And I should see unchecked the box "Agree"
And I should see unchecked the box "Not agree"
And I should see unchecked the box "Undecided"
And I should see the text "User consents not found."
Given I am logged in as "behatuser1"
Then I should be on the homepage
And I should see the success message "We published a new version of the data policy. You can review the data policy here."
When I click "here"
Then I should be on "data-policy-agreement"
When I am logged in as "behatsitemanager" with the "without consent" permission
And I am on "admin/reports/data-policy-agreements"
Then I should not see the text "User consents not found."
And I should see "Undecided" in the "td.views-field-state" element
When I am logged in as "behatuser1"
Then I should not see the success message "We published a new version of the data policy. You can review the data policy here."
When I am on "data-policy-agreement"
And I press "Save"
Then I should be on the homepage
When I am logged in as "behatsitemanager" with the "without consent" permission
And I am on "admin/reports/data-policy-agreements"
Then I should see "Not agree" in the "td.views-field-state" element
When I am logged in as "behatuser1"
And I am on "data-policy-agreement"
And I check the box "data_policy"
And I press "Save"
Then I should be on the homepage
When I am logged in as "behatsitemanager" with the "without consent" permission
And I am on "admin/reports/data-policy-agreements"
Then I should see "Agree" in the "td.views-field-state" element
When I am logged in as "behatuser2"
And I click "here"
And I am logged in as "behatuser3"
And I click "here"
And I press "Save"
And I am logged in as "behatsitemanager" with the "without consent" permission
And I am on "admin/reports/data-policy-agreements"
Then I should see the link "behatuser1"
And I should see the link "behatuser2"
And I should see the link "behatuser3"
When I check the box "Agree"
And I press "Apply"
Then I should see the link "behatuser1"
And I should not see the link "behatuser2"
And I should not see the link "behatuser3"
When I uncheck the box "Agree"
And I check the box "Not agree"
And I press "Apply"
Then I should not see the link "behatuser1"
And I should not see the link "behatuser2"
And I should see the link "behatuser3"
When I uncheck the box "Not agree"
And I check the box "Undecided"
And I press "Apply"
Then I should not see the link "behatuser1"
And I should see the link "behatuser2"
And I should not see the link "behatuser3"
When I check the box "Not agree"
And I press "Apply"
Then I should not see the link "behatuser1"
And I should see the link "behatuser2"
And I should see the link "behatuser3"
When I check the box "Agree"
And I press "Apply"
Then I should see the link "behatuser1"
And I should see the link "behatuser2"
And I should see the link "behatuser3"
When I uncheck the box "Undecided"
And I press "Apply"
Then I should see the link "behatuser1"
And I should not see the link "behatuser2"
And I should see the link "behatuser3"