-
Notifications
You must be signed in to change notification settings - Fork 14
/
Edit_Info_Person_Affected.feature
139 lines (121 loc) · 7.67 KB
/
Edit_Info_Person_Affected.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
@portal
Feature: Edit information on Person Affected
Background:
Given the "selected phase" is one of the phases with the "People Affected table"
Scenario: View information icon in table
Given a logged-in user with "RegistrationPersonalREAD" permission
When the user views the "People Affected Table"
Then the user sees an "information icon" in each row at the beginning of the "Person Affected" column
When the user hovers over it
Then it is highlighted
Scenario: No permission to view information
Given the user does not have the "RegistrationPersonalREAD" permission
When the user views the "People Affected Table"
Then the user does not see the information-icon, but only the 'PA#X' text
Scenario: Open the popup to view and edit information
Given a logged-in user with "RegistrationPersonalREAD" permission
When the user click the "information icon"
Then a popup opens
And in the title the ID-number of the Person Affected is mentioned
And an input-field for the "paymentAmountMultiplier" and "phoneNumber" and "preferredLanguage" is shown
And an input-field for each Custom Attribute is shown
And an input-field for each FSP-attribute (such as "whatsappPhoneNumber") is shown
And a dropdown-list with the current chosen FSP is shown
And all input-fields have an accompanying "save" button which is disabled
And there is an explanation, including PII-warning
And there is a "save" button
Scenario: Update paymentAmountMultiplier successfully
Given no automatic calculation of paymentAmountMultiplier is configured for the program
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the "paymentAmountMultiplier" is shown
When the user changes the value and presses the save-button
Then the 'Reason for update' popup opens
When the user fills in the reason and presses the 'save' button
Then the save-button changes into a progress indicator
And the value of the input-field is written to the database
And the progress indicator changes into the save-button again
And the "paymentAmountMultiplier" is updated
And the data change is logged in the Profile page Activity overview > See 'View_PA_profile_page.feature' for details
Scenario: Update paymentAmountMultiplier with invalid value
Given no automatic calculation of paymentAmountMultiplier is configured for the program
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the "paymentAmountMultiplier" is shown
When the user changes the value to "" or a negative number and presses the update-button
Then the update-button changes into a progress indicator
And a feedback message with the specific requirements of the value is shown
And the progress indicator changes into the update-button again
Scenario: Update preferredLanguage successfully
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the "preferredLanguage" is shown
When the user changes the value and presses the save-button
Then the 'Reason for update' popup opens
When the user fills in the reason and presses the 'save' button
Then the save-button changes into a progress indicator
When the user selects a different option from the dropdown and presses the update-button
Then the update-button changes into a progress indicator
And the value of the input-field is written to the database
And the progress indicator changes into the update-button again
And the "preferredLanguage" is updated
And the data change is logged in the Profile page Activity overview > See 'View_PA_profile_page.feature' for details
Scenario: Update custom attributes successfully
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the is shown
When the user changes the value to something invalid and presses the update-button
Then the update-button changes into a progress indicator
And a feedback message with the specific requirements of the value is shown
And the progress indicator changes into the update-button again
And - if configured for the program - the "paymentAmountMultiplier" is recalculated based on formula
And the data change is logged in the Profile page Activity overview > See 'View_PA_profile_page.feature' for details
Scenario: Update 'numeric' answer with invalid value
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the is shown
When the user tries to enter a non-numeric number
Then nothing happens
Scenario: Update 'phonenumber' answer with invalid value
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the is shown
When the user changes the phonenumber to a non-existent phone-number and presses the update-button
Then the update-button changes into a progress indicator
And a feedback message saying the value is invalid appears
And the progress indicator changes into the update-button again
Scenario: Update 'phonenumber' answer with empty value
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the is shown
Given that the program-'setting' "allowEmptyPhoneNumber" is set to true
When the user empties out the input-field and presses the update-button
Then the update-button changes into a progress indicator
And a feedback message saying the value is updated
And the progress indicator changes into the update-button again
Scenario: Update 'date' answer with invalid value
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the is shown
When the user changes the date to an invalid date and presses the update-button
Then the update-button changes into a progress indicator
And a feedback message with the specific requirements of the value is shown
And the progress indicator changes into the update-button again
Scenario: Update chosen FSP
Given a logged-in user with "RegistrationPersonalREAD" permission
Given the user has opened the popup to edit information
Given an input-field for the current "FSP" is shown
When the user changes the chosen FSP
Then a message appears that attributes relating to the current FSP will be deleted and it lists these attributes
And for each attribute of the new FSP a new input field appears
When the user has filled in values for each new input field
Then the 'update' button of the chosen 'FSP' gets enabled
When the user clicks the 'update' button
Then the request is made
And response is given whether it was successful or not (if not, likely due to validation errors on the input-fields)
When the user closes and re-opens the pop-update
Then the input-fields for attributes of the old FSP are gone
And input-fields for attributes of the new FSP are shown
And the new FSP shows as the current selected value of the dropdown
And the FSP-change is logged in the Profile page Activity overview
And the data changes related to the FSP-change are also logged in the Activity overview with reason 'Financial service provider change'