@@ -63,3 +63,142 @@ Feature: Directory Client can retrieve Directory Service Policy
63
63
Scenario : Getting the policy for invalid Service throws Forbidden
64
64
When I attempt to retrieve the Policy for the Directory Service with the ID "eba60cb8-c649-11e7-abc4-cec278b6b50a"
65
65
Then a ServiceNotFound error occurs
66
+
67
+ Scenario : Setting Fences on a Method Amount Policy works as expected
68
+ When I create a new MethodAmountPolicy
69
+ And I add the following GeoCircleFence items
70
+ | latitude | longitude | radius | name |
71
+ | 45 .1250 | 150 .51 | 15200 | Large Fence |
72
+ | -50 .0111 | -140 | 100 | Small Fence |
73
+ And I add the following TerritoryFence items
74
+ | country | admin_area | postal_code | name |
75
+ | US | US -NV | 89120 | US -NV |
76
+ | US | US -CA | 90001 | US -CA |
77
+ And I set the Advanced Policy for the Current Directory Service to the new policy
78
+ And I retrieve the Advanced Policy for the Current Directory Service
79
+ Then the Directory Service Policy has "4" fences
80
+ And the Directory Service Policy contains the GeoCircleFence "Large Fence"
81
+ And the "Large Fence" fence has a latitude of "45.1250"
82
+ And the "Large Fence" fence has a longitude of "150.51"
83
+ And the "Large Fence" fence has a radius of "15200"
84
+ And the Directory Service Policy contains the GeoCircleFence "Small Fence"
85
+ And the "Small Fence" fence has a latitude of "-50.0111"
86
+ And the "Small Fence" fence has a longitude of "-140"
87
+ And the "Small Fence" fence has a radius of "100"
88
+ And the Directory Service Policy contains the TerritoryFence "US-NV"
89
+ And the "US-NV" fence has a country of "US"
90
+ And the "US-NV" fence has an administrative_area of "US-NV"
91
+ And the "US-NV" fence has a postal_code of "89120"
92
+ And the Directory Service Policy contains the TerritoryFence "US-CA"
93
+ And the "US-CA" fence has a country of "US"
94
+ And the "US-CA" fence has an administrative_area of "US-CA"
95
+ And the "US-CA" fence has a postal_code of "90001"
96
+
97
+ Scenario : Setting Fences on a Factors Policy works as expected
98
+ When I create a new Factors Policy
99
+ And I set the factors to "KNOWLEDGE"
100
+ And I add the following GeoCircleFence items
101
+ | latitude | longitude | radius | name |
102
+ | 45 .1250 | 150 .51 | 15200 | Large Fence |
103
+ | -50 .0111 | -140 | 100 | Small Fence |
104
+ And I add the following TerritoryFence items
105
+ | country | admin_area | postal_code | name |
106
+ | US | US -NV | 89120 | US -NV |
107
+ | US | US -CA | 90001 | US -CA |
108
+ And I set the Advanced Policy for the Current Directory Service to the new policy
109
+ And I retrieve the Advanced Policy for the Current Directory Service
110
+ Then the Directory Service Policy has "4" fences
111
+ And the Directory Service Policy contains the GeoCircleFence "Large Fence"
112
+ And the "Large Fence" fence has a latitude of "45.1250"
113
+ And the "Large Fence" fence has a longitude of "150.51"
114
+ And the "Large Fence" fence has a radius of "15200"
115
+ And the Directory Service Policy contains the GeoCircleFence "Small Fence"
116
+ And the "Small Fence" fence has a latitude of "-50.0111"
117
+ And the "Small Fence" fence has a longitude of "-140"
118
+ And the "Small Fence" fence has a radius of "100"
119
+ And the Directory Service Policy contains the TerritoryFence "US-NV"
120
+ And the "US-NV" fence has a country of "US"
121
+ And the "US-NV" fence has an administrative_area of "US-NV"
122
+ And the "US-NV" fence has a postal_code of "89120"
123
+ And the Directory Service Policy contains the TerritoryFence "US-CA"
124
+ And the "US-CA" fence has a country of "US"
125
+ And the "US-CA" fence has an administrative_area of "US-CA"
126
+ And the "US-CA" fence has a postal_code of "90001"
127
+
128
+ Scenario : Setting Inside Policy to Factors Policy works as expected
129
+ Given the Directory Service is set to any Conditional Geofence Policy
130
+ When I set the inside Policy to a new Factors Policy
131
+ And I set the inside Policy factors to "Knowledge"
132
+ And I set the Advanced Policy for the Current Directory Service to the new policy
133
+ And I retrieve the Advanced Policy for the Current Directory Service
134
+ Then the inside Policy should be a FactorsPolicy
135
+ And the inside Policy factors should be set to "Knowledge"
136
+ And deny_rooted_jailbroken should be set to "False"
137
+ And deny_emulator_simulator should be set to "False"
138
+ And the Directory Service Policy has "1" fence
139
+
140
+ Scenario : Setting Inside Policy to Methods Amount Policy works as expected
141
+ Given the Directory Service is set to any Conditional Geofence Policy
142
+ When I set the inside Policy to a new MethodAmountPolicy
143
+ And I set the inside Policy amount to "2"
144
+ And I set the Advanced Policy for the Current Directory Service to the new policy
145
+ And I retrieve the Advanced Policy for the Current Directory Service
146
+ Then the inside Policy should be a MethodAmountPolicy
147
+ And the inside Policy amount should be set to "2"
148
+ And deny_rooted_jailbroken should be set to "False"
149
+ And deny_emulator_simulator should be set to "False"
150
+ And the Directory Service Policy has "1" fence
151
+
152
+ Scenario : Setting Outside Policy to Factors Policy works as expected
153
+ Given the Directory Service is set to any Conditional Geofence Policy
154
+ When I set the outside Policy to a new Factors Policy
155
+ And I set the outside Policy factors to "Knowledge"
156
+ And I set the Advanced Policy for the Current Directory Service to the new policy
157
+ And I retrieve the Advanced Policy for the Current Directory Service
158
+ Then the outside Policy should be a FactorsPolicy
159
+ And the outside Policy factors should be set to "Knowledge"
160
+ And deny_rooted_jailbroken should be set to "False"
161
+ And deny_emulator_simulator should be set to "False"
162
+ And the Directory Service Policy has "1" fence
163
+
164
+ Scenario : Setting Outside Policy to Methods Amount Policy works as expected
165
+ Given the Directory Service is set to any Conditional Geofence Policy
166
+ When I set the outside Policy to a new MethodAmountPolicy
167
+ And I set the outside Policy amount to "2"
168
+ And I set the Advanced Policy for the Current Directory Service to the new policy
169
+ And I retrieve the Advanced Policy for the Current Directory Service
170
+ Then the outside Policy should be a MethodAmountPolicy
171
+ And the outside Policy amount should be set to "2"
172
+ And deny_rooted_jailbroken should be set to "False"
173
+ And deny_emulator_simulator should be set to "False"
174
+ And the Directory Service Policy has "1" fence
175
+
176
+ Scenario : Setting Fences on a Conditional Geofence Policy works as expected
177
+ Given the Directory Service is set to any Conditional Geofence Policy
178
+ When I add the following GeoCircleFence items
179
+ | latitude | longitude | radius | name |
180
+ | 45 .1250 | 150 .51 | 15200 | Large Fence |
181
+ | -50 .0111 | -140 | 100 | Small Fence |
182
+ And I add the following TerritoryFence items
183
+ | country | admin_area | postal_code | name |
184
+ | US | US -NV | 89120 | US -NV |
185
+ | US | US -CA | 90001 | US -CA |
186
+ And I set the Advanced Policy for the Current Directory Service to the new policy
187
+ And I retrieve the Advanced Policy for the Current Directory Service
188
+ Then the Directory Service Policy has "5" fences
189
+ And the Directory Service Policy contains the GeoCircleFence "Large Fence"
190
+ And the "Large Fence" fence has a latitude of "45.1250"
191
+ And the "Large Fence" fence has a longitude of "150.51"
192
+ And the "Large Fence" fence has a radius of "15200"
193
+ And the Directory Service Policy contains the GeoCircleFence "Small Fence"
194
+ And the "Small Fence" fence has a latitude of "-50.0111"
195
+ And the "Small Fence" fence has a longitude of "-140"
196
+ And the "Small Fence" fence has a radius of "100"
197
+ And the Directory Service Policy contains the TerritoryFence "US-NV"
198
+ And the "US-NV" fence has a country of "US"
199
+ And the "US-NV" fence has an administrative_area of "US-NV"
200
+ And the "US-NV" fence has a postal_code of "89120"
201
+ And the Directory Service Policy contains the TerritoryFence "US-CA"
202
+ And the "US-CA" fence has a country of "US"
203
+ And the "US-CA" fence has an administrative_area of "US-CA"
204
+ And the "US-CA" fence has a postal_code of "90001"
0 commit comments