@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.
- package/esm2020/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.mjs +9 -3
- package/esm2020/lib/components/step-form/gio-ps-step-form.component.mjs +12 -12
- package/esm2020/lib/gio-policy-studio.module.mjs +6 -3
- package/esm2020/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.mjs +1 -1
- package/esm2020/testing/lib/components/step-form/gio-ps-step-form.harness.mjs +4 -1
- package/esm2020/testing/lib/models/flow/Step.fixture.mjs +5 -2
- package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs +125 -119
- package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs +22 -15
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-policy-studio-angular-testing.mjs +137 -131
- package/fesm2020/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2020/gravitee-ui-policy-studio-angular.mjs +20 -12
- package/fesm2020/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.d.ts +2 -0
- package/lib/components/step-form/gio-ps-step-form.component.d.ts +2 -1
- package/lib/gio-policy-studio.module.d.ts +1 -1
- package/package.json +1 -1
- package/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.d.ts +3 -5
- package/testing/lib/components/step-form/gio-ps-step-form.harness.d.ts +6 -4
|
@@ -116,137 +116,6 @@ function fakeDefaultFlowExecution(modifier) {
|
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
/*
|
|
120
|
-
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
121
|
-
*
|
|
122
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
123
|
-
* you may not use this file except in compliance with the License.
|
|
124
|
-
* You may obtain a copy of the License at
|
|
125
|
-
*
|
|
126
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
127
|
-
*
|
|
128
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
129
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
130
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
131
|
-
* See the License for the specific language governing permissions and
|
|
132
|
-
* limitations under the License.
|
|
133
|
-
*/
|
|
134
|
-
function fakeTestPolicyStep(modifier) {
|
|
135
|
-
const base = {
|
|
136
|
-
name: fakeTestPolicy().name,
|
|
137
|
-
description: 'Test Policy description',
|
|
138
|
-
enabled: true,
|
|
139
|
-
policy: 'test-policy',
|
|
140
|
-
};
|
|
141
|
-
if (isFunction(modifier)) {
|
|
142
|
-
return modifier(base);
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
...base,
|
|
146
|
-
...modifier,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function fakeRateLimitStep(modifier) {
|
|
150
|
-
const base = {
|
|
151
|
-
name: 'Rate Limit',
|
|
152
|
-
description: 'Step description',
|
|
153
|
-
enabled: true,
|
|
154
|
-
policy: 'rate-limit',
|
|
155
|
-
configuration: {
|
|
156
|
-
rate: {
|
|
157
|
-
limit: 10,
|
|
158
|
-
periodTime: 1,
|
|
159
|
-
periodTimeUnit: 'MINUTES',
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
};
|
|
163
|
-
if (isFunction(modifier)) {
|
|
164
|
-
return modifier(base);
|
|
165
|
-
}
|
|
166
|
-
return {
|
|
167
|
-
...base,
|
|
168
|
-
...modifier,
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function fakeJsonToXmlStep(modifier) {
|
|
172
|
-
const base = {
|
|
173
|
-
name: 'JSON to XML',
|
|
174
|
-
description: 'JSON to XML',
|
|
175
|
-
enabled: true,
|
|
176
|
-
policy: 'json-xml',
|
|
177
|
-
configuration: {},
|
|
178
|
-
};
|
|
179
|
-
if (isFunction(modifier)) {
|
|
180
|
-
return modifier(base);
|
|
181
|
-
}
|
|
182
|
-
return {
|
|
183
|
-
...base,
|
|
184
|
-
...modifier,
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/*
|
|
189
|
-
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
190
|
-
*
|
|
191
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
* you may not use this file except in compliance with the License.
|
|
193
|
-
* You may obtain a copy of the License at
|
|
194
|
-
*
|
|
195
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
*
|
|
197
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
* See the License for the specific language governing permissions and
|
|
201
|
-
* limitations under the License.
|
|
202
|
-
*/
|
|
203
|
-
|
|
204
|
-
/*
|
|
205
|
-
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
206
|
-
*
|
|
207
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
208
|
-
* you may not use this file except in compliance with the License.
|
|
209
|
-
* You may obtain a copy of the License at
|
|
210
|
-
*
|
|
211
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
212
|
-
*
|
|
213
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
214
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
215
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
216
|
-
* See the License for the specific language governing permissions and
|
|
217
|
-
* limitations under the License.
|
|
218
|
-
*/
|
|
219
|
-
function fakePlan(modifier) {
|
|
220
|
-
const base = {
|
|
221
|
-
id: 'plan-id',
|
|
222
|
-
name: 'Keyless plan',
|
|
223
|
-
flows: [],
|
|
224
|
-
};
|
|
225
|
-
if (isFunction(modifier)) {
|
|
226
|
-
return modifier(base);
|
|
227
|
-
}
|
|
228
|
-
return {
|
|
229
|
-
...base,
|
|
230
|
-
...modifier,
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/*
|
|
235
|
-
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
236
|
-
*
|
|
237
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
238
|
-
* you may not use this file except in compliance with the License.
|
|
239
|
-
* You may obtain a copy of the License at
|
|
240
|
-
*
|
|
241
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
242
|
-
*
|
|
243
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
244
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
245
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
246
|
-
* See the License for the specific language governing permissions and
|
|
247
|
-
* limitations under the License.
|
|
248
|
-
*/
|
|
249
|
-
|
|
250
119
|
/*
|
|
251
120
|
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
252
121
|
*
|
|
@@ -379,6 +248,140 @@ function fakeAllPolicies() {
|
|
|
379
248
|
];
|
|
380
249
|
}
|
|
381
250
|
|
|
251
|
+
/*
|
|
252
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
253
|
+
*
|
|
254
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
255
|
+
* you may not use this file except in compliance with the License.
|
|
256
|
+
* You may obtain a copy of the License at
|
|
257
|
+
*
|
|
258
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
259
|
+
*
|
|
260
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
261
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
262
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
263
|
+
* See the License for the specific language governing permissions and
|
|
264
|
+
* limitations under the License.
|
|
265
|
+
*/
|
|
266
|
+
function fakeTestPolicyStep(modifier) {
|
|
267
|
+
const base = {
|
|
268
|
+
name: fakeTestPolicy().name,
|
|
269
|
+
description: 'Test Policy description',
|
|
270
|
+
enabled: true,
|
|
271
|
+
policy: 'test-policy',
|
|
272
|
+
configuration: {
|
|
273
|
+
test: 'test',
|
|
274
|
+
},
|
|
275
|
+
};
|
|
276
|
+
if (isFunction(modifier)) {
|
|
277
|
+
return modifier(base);
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
...base,
|
|
281
|
+
...modifier,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
function fakeRateLimitStep(modifier) {
|
|
285
|
+
const base = {
|
|
286
|
+
name: 'Rate Limit',
|
|
287
|
+
description: 'Step description',
|
|
288
|
+
enabled: true,
|
|
289
|
+
policy: 'rate-limit',
|
|
290
|
+
configuration: {
|
|
291
|
+
rate: {
|
|
292
|
+
limit: 10,
|
|
293
|
+
periodTime: 1,
|
|
294
|
+
periodTimeUnit: 'MINUTES',
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
};
|
|
298
|
+
if (isFunction(modifier)) {
|
|
299
|
+
return modifier(base);
|
|
300
|
+
}
|
|
301
|
+
return {
|
|
302
|
+
...base,
|
|
303
|
+
...modifier,
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function fakeJsonToXmlStep(modifier) {
|
|
307
|
+
const base = {
|
|
308
|
+
name: 'JSON to XML',
|
|
309
|
+
description: 'JSON to XML',
|
|
310
|
+
enabled: true,
|
|
311
|
+
policy: 'json-xml',
|
|
312
|
+
configuration: {},
|
|
313
|
+
};
|
|
314
|
+
if (isFunction(modifier)) {
|
|
315
|
+
return modifier(base);
|
|
316
|
+
}
|
|
317
|
+
return {
|
|
318
|
+
...base,
|
|
319
|
+
...modifier,
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/*
|
|
324
|
+
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
325
|
+
*
|
|
326
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
327
|
+
* you may not use this file except in compliance with the License.
|
|
328
|
+
* You may obtain a copy of the License at
|
|
329
|
+
*
|
|
330
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
331
|
+
*
|
|
332
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
333
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
334
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
335
|
+
* See the License for the specific language governing permissions and
|
|
336
|
+
* limitations under the License.
|
|
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
|
+
function fakePlan(modifier) {
|
|
355
|
+
const base = {
|
|
356
|
+
id: 'plan-id',
|
|
357
|
+
name: 'Keyless plan',
|
|
358
|
+
flows: [],
|
|
359
|
+
};
|
|
360
|
+
if (isFunction(modifier)) {
|
|
361
|
+
return modifier(base);
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
...base,
|
|
365
|
+
...modifier,
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/*
|
|
370
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
371
|
+
*
|
|
372
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
373
|
+
* you may not use this file except in compliance with the License.
|
|
374
|
+
* You may obtain a copy of the License at
|
|
375
|
+
*
|
|
376
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
377
|
+
*
|
|
378
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
379
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
380
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
381
|
+
* See the License for the specific language governing permissions and
|
|
382
|
+
* limitations under the License.
|
|
383
|
+
*/
|
|
384
|
+
|
|
382
385
|
/*
|
|
383
386
|
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
384
387
|
*
|
|
@@ -1039,6 +1042,9 @@ class GioPolicyStudioStepFormHarness extends ComponentHarness {
|
|
|
1039
1042
|
const descriptionInput = await this.getDescriptionInput();
|
|
1040
1043
|
await descriptionInput.setValue(stepForm.description);
|
|
1041
1044
|
}
|
|
1045
|
+
if (stepForm.waitForPolicyFormCompletionCb) {
|
|
1046
|
+
await stepForm.waitForPolicyFormCompletionCb(this.locatorFactory);
|
|
1047
|
+
}
|
|
1042
1048
|
}
|
|
1043
1049
|
async getStepFormValue() {
|
|
1044
1050
|
const descriptionInput = await this.getDescriptionInput();
|