@gravitee/ui-policy-studio-angular 7.14.0 → 7.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,125 +105,6 @@ function fakeDefaultFlowExecution(modifier) {
105
105
  return Object.assign(Object.assign({}, base), modifier);
106
106
  }
107
107
 
108
- /*
109
- * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
110
- *
111
- * Licensed under the Apache License, Version 2.0 (the "License");
112
- * you may not use this file except in compliance with the License.
113
- * You may obtain a copy of the License at
114
- *
115
- * http://www.apache.org/licenses/LICENSE-2.0
116
- *
117
- * Unless required by applicable law or agreed to in writing, software
118
- * distributed under the License is distributed on an "AS IS" BASIS,
119
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
120
- * See the License for the specific language governing permissions and
121
- * limitations under the License.
122
- */
123
- function fakeTestPolicyStep(modifier) {
124
- const base = {
125
- name: fakeTestPolicy().name,
126
- description: 'Test Policy description',
127
- enabled: true,
128
- policy: 'test-policy',
129
- };
130
- if (isFunction(modifier)) {
131
- return modifier(base);
132
- }
133
- return Object.assign(Object.assign({}, base), modifier);
134
- }
135
- function fakeRateLimitStep(modifier) {
136
- const base = {
137
- name: 'Rate Limit',
138
- description: 'Step description',
139
- enabled: true,
140
- policy: 'rate-limit',
141
- configuration: {
142
- rate: {
143
- limit: 10,
144
- periodTime: 1,
145
- periodTimeUnit: 'MINUTES',
146
- },
147
- },
148
- };
149
- if (isFunction(modifier)) {
150
- return modifier(base);
151
- }
152
- return Object.assign(Object.assign({}, base), modifier);
153
- }
154
- function fakeJsonToXmlStep(modifier) {
155
- const base = {
156
- name: 'JSON to XML',
157
- description: 'JSON to XML',
158
- enabled: true,
159
- policy: 'json-xml',
160
- configuration: {},
161
- };
162
- if (isFunction(modifier)) {
163
- return modifier(base);
164
- }
165
- return Object.assign(Object.assign({}, base), modifier);
166
- }
167
-
168
- /*
169
- * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
170
- *
171
- * Licensed under the Apache License, Version 2.0 (the "License");
172
- * you may not use this file except in compliance with the License.
173
- * You may obtain a copy of the License at
174
- *
175
- * http://www.apache.org/licenses/LICENSE-2.0
176
- *
177
- * Unless required by applicable law or agreed to in writing, software
178
- * distributed under the License is distributed on an "AS IS" BASIS,
179
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
180
- * See the License for the specific language governing permissions and
181
- * limitations under the License.
182
- */
183
-
184
- /*
185
- * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
186
- *
187
- * Licensed under the Apache License, Version 2.0 (the "License");
188
- * you may not use this file except in compliance with the License.
189
- * You may obtain a copy of the License at
190
- *
191
- * http://www.apache.org/licenses/LICENSE-2.0
192
- *
193
- * Unless required by applicable law or agreed to in writing, software
194
- * distributed under the License is distributed on an "AS IS" BASIS,
195
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
196
- * See the License for the specific language governing permissions and
197
- * limitations under the License.
198
- */
199
- function fakePlan(modifier) {
200
- const base = {
201
- id: 'plan-id',
202
- name: 'Keyless plan',
203
- flows: [],
204
- };
205
- if (isFunction(modifier)) {
206
- return modifier(base);
207
- }
208
- return Object.assign(Object.assign({}, base), modifier);
209
- }
210
-
211
- /*
212
- * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
213
- *
214
- * Licensed under the Apache License, Version 2.0 (the "License");
215
- * you may not use this file except in compliance with the License.
216
- * You may obtain a copy of the License at
217
- *
218
- * http://www.apache.org/licenses/LICENSE-2.0
219
- *
220
- * Unless required by applicable law or agreed to in writing, software
221
- * distributed under the License is distributed on an "AS IS" BASIS,
222
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
223
- * See the License for the specific language governing permissions and
224
- * limitations under the License.
225
- */
226
-
227
108
  /*
228
109
  * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
229
110
  *
@@ -349,6 +230,128 @@ function fakeAllPolicies() {
349
230
  ];
350
231
  }
351
232
 
233
+ /*
234
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
235
+ *
236
+ * Licensed under the Apache License, Version 2.0 (the "License");
237
+ * you may not use this file except in compliance with the License.
238
+ * You may obtain a copy of the License at
239
+ *
240
+ * http://www.apache.org/licenses/LICENSE-2.0
241
+ *
242
+ * Unless required by applicable law or agreed to in writing, software
243
+ * distributed under the License is distributed on an "AS IS" BASIS,
244
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
245
+ * See the License for the specific language governing permissions and
246
+ * limitations under the License.
247
+ */
248
+ function fakeTestPolicyStep(modifier) {
249
+ const base = {
250
+ name: fakeTestPolicy().name,
251
+ description: 'Test Policy description',
252
+ enabled: true,
253
+ policy: 'test-policy',
254
+ configuration: {
255
+ test: 'test',
256
+ },
257
+ };
258
+ if (isFunction(modifier)) {
259
+ return modifier(base);
260
+ }
261
+ return Object.assign(Object.assign({}, base), modifier);
262
+ }
263
+ function fakeRateLimitStep(modifier) {
264
+ const base = {
265
+ name: 'Rate Limit',
266
+ description: 'Step description',
267
+ enabled: true,
268
+ policy: 'rate-limit',
269
+ configuration: {
270
+ rate: {
271
+ limit: 10,
272
+ periodTime: 1,
273
+ periodTimeUnit: 'MINUTES',
274
+ },
275
+ },
276
+ };
277
+ if (isFunction(modifier)) {
278
+ return modifier(base);
279
+ }
280
+ return Object.assign(Object.assign({}, base), modifier);
281
+ }
282
+ function fakeJsonToXmlStep(modifier) {
283
+ const base = {
284
+ name: 'JSON to XML',
285
+ description: 'JSON to XML',
286
+ enabled: true,
287
+ policy: 'json-xml',
288
+ configuration: {},
289
+ };
290
+ if (isFunction(modifier)) {
291
+ return modifier(base);
292
+ }
293
+ return Object.assign(Object.assign({}, base), modifier);
294
+ }
295
+
296
+ /*
297
+ * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
298
+ *
299
+ * Licensed under the Apache License, Version 2.0 (the "License");
300
+ * you may not use this file except in compliance with the License.
301
+ * You may obtain a copy of the License at
302
+ *
303
+ * http://www.apache.org/licenses/LICENSE-2.0
304
+ *
305
+ * Unless required by applicable law or agreed to in writing, software
306
+ * distributed under the License is distributed on an "AS IS" BASIS,
307
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
308
+ * See the License for the specific language governing permissions and
309
+ * limitations under the License.
310
+ */
311
+
312
+ /*
313
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
314
+ *
315
+ * Licensed under the Apache License, Version 2.0 (the "License");
316
+ * you may not use this file except in compliance with the License.
317
+ * You may obtain a copy of the License at
318
+ *
319
+ * http://www.apache.org/licenses/LICENSE-2.0
320
+ *
321
+ * Unless required by applicable law or agreed to in writing, software
322
+ * distributed under the License is distributed on an "AS IS" BASIS,
323
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
324
+ * See the License for the specific language governing permissions and
325
+ * limitations under the License.
326
+ */
327
+ function fakePlan(modifier) {
328
+ const base = {
329
+ id: 'plan-id',
330
+ name: 'Keyless plan',
331
+ flows: [],
332
+ };
333
+ if (isFunction(modifier)) {
334
+ return modifier(base);
335
+ }
336
+ return Object.assign(Object.assign({}, base), modifier);
337
+ }
338
+
339
+ /*
340
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
341
+ *
342
+ * Licensed under the Apache License, Version 2.0 (the "License");
343
+ * you may not use this file except in compliance with the License.
344
+ * You may obtain a copy of the License at
345
+ *
346
+ * http://www.apache.org/licenses/LICENSE-2.0
347
+ *
348
+ * Unless required by applicable law or agreed to in writing, software
349
+ * distributed under the License is distributed on an "AS IS" BASIS,
350
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
351
+ * See the License for the specific language governing permissions and
352
+ * limitations under the License.
353
+ */
354
+
352
355
  /*
353
356
  * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
354
357
  *
@@ -957,6 +960,9 @@ class GioPolicyStudioStepFormHarness extends ComponentHarness {
957
960
  const descriptionInput = yield this.getDescriptionInput();
958
961
  yield descriptionInput.setValue(stepForm.description);
959
962
  }
963
+ if (stepForm.waitForPolicyFormCompletionCb) {
964
+ yield stepForm.waitForPolicyFormCompletionCb(this.locatorFactory);
965
+ }
960
966
  });
961
967
  }
962
968
  getStepFormValue() {