@gravitee/ui-policy-studio-angular 7.7.0 → 7.7.1-add-flow-edit-test-4674153
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/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.mjs +17 -5
- package/esm2020/lib/models/flow/HttpMethod.mjs +27 -1
- package/esm2020/testing/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.mjs +48 -7
- package/esm2020/testing/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.mjs +36 -7
- package/esm2020/testing/lib/models/flow/HttpMethod.mjs +27 -1
- package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs +108 -12
- package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs +45 -7
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-policy-studio-angular-testing.mjs +82 -12
- package/fesm2020/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/fesm2020/gravitee-ui-policy-studio-angular.mjs +43 -5
- package/fesm2020/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.d.ts +1 -0
- package/lib/models/flow/HttpMethod.d.ts +1 -0
- package/package.json +1 -1
- package/testing/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.d.ts +21 -0
- package/testing/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.d.ts +18 -0
- package/testing/lib/models/flow/HttpMethod.d.ts +1 -0
|
@@ -255,19 +255,21 @@ class GioPolicyStudioFlowProxyFormDialogHarness extends ComponentHarness {
|
|
|
255
255
|
super(...arguments);
|
|
256
256
|
this.getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));
|
|
257
257
|
this.getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));
|
|
258
|
+
this.nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }));
|
|
259
|
+
this.pathOperatorInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="pathOperator"]' }));
|
|
260
|
+
this.pathInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="path"]' }));
|
|
261
|
+
this.methodsInput = this.locatorFor(GioFormTagsInputHarness.with({ selector: '[formControlName="methods"]' }));
|
|
262
|
+
this.conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }));
|
|
258
263
|
}
|
|
259
264
|
setFlowFormValues(flow) {
|
|
260
265
|
var e_1, _a;
|
|
261
266
|
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
const nameInput = yield this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }))();
|
|
263
|
-
const pathOperatorInput = yield this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="pathOperator"]' }))();
|
|
264
|
-
const pathInput = yield this.locatorFor(MatInputHarness.with({ selector: '[formControlName="path"]' }))();
|
|
265
|
-
const methodsInput = yield this.locatorFor(GioFormTagsInputHarness.with({ selector: '[formControlName="methods"]' }))();
|
|
266
|
-
const conditionInput = yield this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }))();
|
|
267
267
|
if (flow.name) {
|
|
268
|
+
const nameInput = yield this.nameInput();
|
|
268
269
|
yield nameInput.setValue(flow.name);
|
|
269
270
|
}
|
|
270
271
|
if (flow.pathOperator) {
|
|
272
|
+
const pathOperatorInput = yield this.pathOperatorInput();
|
|
271
273
|
yield pathOperatorInput.open();
|
|
272
274
|
// Unselect all options before selecting the new one
|
|
273
275
|
for (const option of yield pathOperatorInput.getOptions()) {
|
|
@@ -278,9 +280,11 @@ class GioPolicyStudioFlowProxyFormDialogHarness extends ComponentHarness {
|
|
|
278
280
|
yield pathOperatorInput.clickOptions({ text: new RegExp(flow.pathOperator, 'i') });
|
|
279
281
|
}
|
|
280
282
|
if (flow.path) {
|
|
281
|
-
yield pathInput
|
|
283
|
+
const input = yield this.pathInput();
|
|
284
|
+
yield input.setValue(flow.path);
|
|
282
285
|
}
|
|
283
286
|
if (flow.methods) {
|
|
287
|
+
const methodsInput = yield this.methodsInput();
|
|
284
288
|
yield methodsInput.removeTag('ALL');
|
|
285
289
|
try {
|
|
286
290
|
for (var _b = __asyncValues(flow.methods), _c; _c = yield _b.next(), !_c.done;) {
|
|
@@ -297,10 +301,47 @@ class GioPolicyStudioFlowProxyFormDialogHarness extends ComponentHarness {
|
|
|
297
301
|
}
|
|
298
302
|
}
|
|
299
303
|
if (flow.condition) {
|
|
304
|
+
const conditionInput = yield this.conditionInput();
|
|
300
305
|
yield conditionInput.setValue(flow.condition);
|
|
301
306
|
}
|
|
302
307
|
});
|
|
303
308
|
}
|
|
309
|
+
getFlowFormValues() {
|
|
310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
return {
|
|
312
|
+
name: yield this.getFlowName(),
|
|
313
|
+
pathOperator: yield this.getPathOperator(),
|
|
314
|
+
path: yield this.getFlowPath(),
|
|
315
|
+
methods: yield this.getMethods(),
|
|
316
|
+
condition: yield this.getCondition(),
|
|
317
|
+
};
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
getFlowName() {
|
|
321
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
+
return this.nameInput().then(input => input.getValue());
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
getFlowPath() {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
return this.pathInput().then(input => input.getValue());
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
getPathOperator() {
|
|
331
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
332
|
+
return this.pathOperatorInput().then(input => input.getValueText());
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
getMethods() {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
return this.methodsInput().then(input => input.getTags());
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
getCondition() {
|
|
341
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
+
return this.conditionInput().then(input => input.getValue());
|
|
343
|
+
});
|
|
344
|
+
}
|
|
304
345
|
save() {
|
|
305
346
|
return __awaiter(this, void 0, void 0, function* () {
|
|
306
347
|
const button = yield this.getSaveBtn();
|
|
@@ -321,19 +362,22 @@ class GioPolicyStudioFlowMessageFormDialogHarness extends ComponentHarness {
|
|
|
321
362
|
super(...arguments);
|
|
322
363
|
this.getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));
|
|
323
364
|
this.getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));
|
|
365
|
+
this.nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }));
|
|
366
|
+
this.channelOperatorInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="channelOperator"]' }));
|
|
367
|
+
this.channelInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="channel"]' }));
|
|
368
|
+
this.operationsInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="operations"]' }));
|
|
369
|
+
this.entrypointsInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="entrypoints"]' }));
|
|
370
|
+
this.conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }));
|
|
324
371
|
}
|
|
325
372
|
setFlowFormValues(flow) {
|
|
326
373
|
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
-
const nameInput = yield this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }))();
|
|
328
|
-
const channelOperatorInput = yield this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="channelOperator"]' }))();
|
|
329
|
-
const channelInput = yield this.locatorFor(MatInputHarness.with({ selector: '[formControlName="channel"]' }))();
|
|
330
|
-
const operationsInput = yield this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="operations"]' }))();
|
|
331
|
-
const entrypointsInput = yield this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="entrypoints"]' }))();
|
|
332
|
-
const conditionInput = yield this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }))();
|
|
333
374
|
if (flow.name) {
|
|
375
|
+
const nameInput = yield this.nameInput();
|
|
334
376
|
yield nameInput.setValue(flow.name);
|
|
335
377
|
}
|
|
336
378
|
if (flow.channelOperator) {
|
|
379
|
+
const channelOperatorInput = yield this.channelOperatorInput();
|
|
380
|
+
const entrypointsInput = yield this.entrypointsInput();
|
|
337
381
|
yield channelOperatorInput.open();
|
|
338
382
|
// Unselect all options before selecting the new one
|
|
339
383
|
for (const option of yield entrypointsInput.getOptions()) {
|
|
@@ -344,9 +388,11 @@ class GioPolicyStudioFlowMessageFormDialogHarness extends ComponentHarness {
|
|
|
344
388
|
yield channelOperatorInput.clickOptions({ text: new RegExp(flow.channelOperator, 'i') });
|
|
345
389
|
}
|
|
346
390
|
if (flow.channel) {
|
|
391
|
+
const channelInput = yield this.channelInput();
|
|
347
392
|
yield channelInput.setValue(flow.channel);
|
|
348
393
|
}
|
|
349
394
|
if (flow.operations) {
|
|
395
|
+
const operationsInput = yield this.operationsInput();
|
|
350
396
|
yield parallel(() => {
|
|
351
397
|
var _a;
|
|
352
398
|
return ((_a = flow.operations) !== null && _a !== void 0 ? _a : []).map((operation) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -362,6 +408,7 @@ class GioPolicyStudioFlowMessageFormDialogHarness extends ComponentHarness {
|
|
|
362
408
|
});
|
|
363
409
|
}
|
|
364
410
|
if (flow.entrypoints) {
|
|
411
|
+
const entrypointsInput = yield this.entrypointsInput();
|
|
365
412
|
yield entrypointsInput.open();
|
|
366
413
|
// Unselect all options before selecting the new one
|
|
367
414
|
for (const option of yield entrypointsInput.getOptions()) {
|
|
@@ -377,10 +424,41 @@ class GioPolicyStudioFlowMessageFormDialogHarness extends ComponentHarness {
|
|
|
377
424
|
});
|
|
378
425
|
}
|
|
379
426
|
if (flow.condition) {
|
|
427
|
+
const conditionInput = yield this.conditionInput();
|
|
380
428
|
yield conditionInput.setValue(flow.condition);
|
|
381
429
|
}
|
|
382
430
|
});
|
|
383
431
|
}
|
|
432
|
+
getName() {
|
|
433
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
434
|
+
return this.nameInput().then(input => input.getValue());
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
getChannelOperator() {
|
|
438
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
439
|
+
return this.channelOperatorInput().then(input => input.getValueText());
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
getChannel() {
|
|
443
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
444
|
+
return this.channelInput().then(input => input.getValue());
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
getOperations() {
|
|
448
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
449
|
+
return this.operationsInput().then(input => input.getValueText());
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
getEntrypoints() {
|
|
453
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
454
|
+
return this.entrypointsInput().then(input => input.getValueText());
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
getCondition() {
|
|
458
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
459
|
+
return this.conditionInput().then(input => input.getValue());
|
|
460
|
+
});
|
|
461
|
+
}
|
|
384
462
|
save() {
|
|
385
463
|
return __awaiter(this, void 0, void 0, function* () {
|
|
386
464
|
const button = yield this.getSaveBtn();
|
|
@@ -393,6 +471,24 @@ class GioPolicyStudioFlowMessageFormDialogHarness extends ComponentHarness {
|
|
|
393
471
|
yield button.click();
|
|
394
472
|
});
|
|
395
473
|
}
|
|
474
|
+
getFormValues() {
|
|
475
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
476
|
+
const name = yield this.getName();
|
|
477
|
+
const channelOperator = yield this.getChannelOperator();
|
|
478
|
+
const channel = yield this.getChannel();
|
|
479
|
+
const entrypoints = (yield this.getEntrypoints()).split(',');
|
|
480
|
+
const operations = (yield this.getOperations()).split(',');
|
|
481
|
+
const condition = yield this.getCondition();
|
|
482
|
+
return {
|
|
483
|
+
name,
|
|
484
|
+
channel,
|
|
485
|
+
channelOperator,
|
|
486
|
+
entrypoints,
|
|
487
|
+
operations,
|
|
488
|
+
condition,
|
|
489
|
+
};
|
|
490
|
+
});
|
|
491
|
+
}
|
|
396
492
|
}
|
|
397
493
|
GioPolicyStudioFlowMessageFormDialogHarness.hostSelector = 'gio-ps-flow-message-form-dialog';
|
|
398
494
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gravitee-ui-policy-studio-angular-testing.mjs","sources":["../../../projects/ui-policy-studio-angular/src/lib/models/flow/Flow.fixture.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/Plan.fixture.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.harness.ts","../../../projects/ui-policy-studio-angular/src/public-testing-api.ts","../../../projects/ui-policy-studio-angular/src/gravitee-ui-policy-studio-angular-testing.ts"],"sourcesContent":["/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from 'lodash';\n\nimport { Flow } from './Flow';\nimport { ChannelSelector, HttpSelector } from './Selector';\n\nexport function fakeChannelFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow {\n const channelSelector: ChannelSelector = {\n type: 'CHANNEL',\n channel: 'channel',\n channelOperator: 'EQUALS',\n entrypoints: ['webhook'],\n operations: ['PUBLISH'],\n };\n\n const base: Flow = {\n name: 'Flow name',\n selectors: [channelSelector],\n request: [],\n response: [],\n subscribe: [],\n publish: [],\n enabled: true,\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n\nexport function fakeHttpFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow {\n const httpSelector: HttpSelector = {\n type: 'HTTP',\n path: '/path',\n pathOperator: 'EQUALS',\n methods: ['GET'],\n };\n\n const base: Flow = {\n name: 'Flow name',\n selectors: [httpSelector],\n request: [],\n response: [],\n subscribe: [],\n publish: [],\n enabled: true,\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './Flow.fixture';\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from 'lodash';\n\nimport { Plan } from './Plan';\n\nexport function fakePlan(modifier?: Partial<Plan> | ((base: Plan) => Plan)): Plan {\n const base: Plan = {\n id: 'plan-id',\n name: 'Keyless plan',\n flows: [],\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './Plan.fixture';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './flow/index-testing';\nexport * from './plan/index-testing';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentHarness, parallel } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\nimport { DivHarness } from '@gravitee/ui-particles-angular/testing';\n\nexport class GioPolicyStudioFlowsMenuHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flows-menu';\n\n private locateFlowsGroups = this.locatorForAll(DivHarness.with({ selector: '.list__flowsGroup' }));\n private locateFlowByText = (text: string | RegExp) =>\n this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup__flow', text }));\n\n public locateGroupByText = (text: string | RegExp) => this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup', text }));\n\n private locateSelectedFlow = this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup__flow.selected' }));\n\n public async getAllFlowsGroups(): Promise<\n {\n name: string | null;\n flows: {\n name: string | null;\n isSelected: boolean;\n infos: string | null;\n }[];\n }[]\n > {\n const flowsGroups = await this.locateFlowsGroups();\n\n return parallel(() =>\n flowsGroups.map(async flowsGroup => {\n const flowsGroupName = await flowsGroup.getText({ childSelector: '.list__flowsGroup__header__label' });\n\n const flowsDiv = await flowsGroup.childLocatorForAll(DivHarness.with({ selector: '.list__flowsGroup__flow' }))();\n\n const flowsInfos = parallel(() =>\n flowsDiv.map(async flowDiv => {\n return {\n name: await flowDiv.getText({ childSelector: '.list__flowsGroup__flow__name' }),\n infos: await flowDiv.getText({ childSelector: '.list__flowsGroup__flow__infos' }),\n isSelected: await flowDiv.host().then(host => host.hasClass('selected')),\n };\n }),\n );\n\n return {\n name: flowsGroupName,\n flows: await flowsInfos,\n };\n }),\n );\n }\n\n public async getSelectedFlow(): Promise<{ name: string | null } | null> {\n const selectedFlow = await this.locateSelectedFlow();\n\n return selectedFlow ? { name: await selectedFlow.getText({ childSelector: '.list__flowsGroup__flow__name' }) } : null;\n }\n\n /**\n * Select a flow by it's text content\n */\n public async selectFlow(flowText: string | RegExp): Promise<void> {\n const flowsGroups = await this.locateFlowByText(flowText)();\n\n if (flowsGroups) {\n await flowsGroups.host().then(host => host.click());\n }\n }\n\n public async addFlow(groupName: string | RegExp): Promise<void> {\n const flowsGroups = await this.locateGroupByText(groupName)();\n\n if (flowsGroups) {\n await (await flowsGroups.childLocatorFor(MatButtonHarness.with({ ancestor: '.list__flowsGroup__header__addBtn' }))()).click();\n }\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentHarness, parallel } from '@angular/cdk/testing';\nimport { DivHarness, SpanHarness } from '@gravitee/ui-particles-angular/testing';\n\nexport class GioPolicyStudioDetailsInfoBarHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flow-details-info-bar';\n\n public async getInfos(): Promise<Record<string, (string | null)[]>> {\n const infosDiv = await this.locatorForAll(DivHarness.with({ selector: '.info' }))();\n\n const allKeyValue = await parallel(() =>\n infosDiv.map(async info => {\n const label = await info.childLocatorFor(SpanHarness.with({ selector: '.info__label' }))();\n const value = await info.childLocatorForAll(SpanHarness.with({ selector: '.info__value' }))();\n return { label: await label.getText(), value: await parallel(() => value.map(v => v.getText())) };\n }),\n );\n\n return allKeyValue.reduce((acc, curr) => {\n if (curr.label) {\n return { ...acc, [curr.label]: curr.value };\n }\n return acc;\n }, {} as Record<string, (string | null)[]>);\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentHarness } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\n\nimport { GioPolicyStudioDetailsInfoBarHarness } from '../flow-details-info-bar/gio-ps-flow-details-info-bar.harness';\n\nexport class GioPolicyStudioDetailsHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flow-details';\n\n public async isDisplayEmptyFlow(): Promise<boolean> {\n const hostText = await (await this.host()).text();\n return hostText.includes('No flows yet');\n }\n\n public async getFlowInfos(): Promise<Record<string, (string | null)[]>> {\n return await (await this.locatorFor(GioPolicyStudioDetailsInfoBarHarness)()).getInfos();\n }\n\n public async matchText(matcher: RegExp): Promise<boolean> {\n const hostText = await (await this.host()).text();\n return matcher.test(hostText);\n }\n\n public async clickEditFlowBtn(): Promise<void> {\n const editFlowBtn = await this.locatorFor(MatButtonHarness.with({ selector: '.header__configBtn__edit' }))();\n await editFlowBtn.click();\n }\n\n public async clickDeleteFlowBtn(): Promise<void> {\n const deleteFlowBtn = await this.locatorFor(MatButtonHarness.with({ selector: '.header__configBtn__delete' }))();\n await deleteFlowBtn.click();\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ComponentHarness } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\nimport { MatInputHarness } from '@angular/material/input/testing';\nimport { MatSelectHarness } from '@angular/material/select/testing';\nimport { GioFormTagsInputHarness } from '@gravitee/ui-particles-angular';\n\nexport class GioPolicyStudioFlowProxyFormDialogHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flow-proxy-form-dialog';\n\n private getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));\n private getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));\n\n public async setFlowFormValues(flow: {\n name?: string;\n pathOperator?: string;\n path?: string;\n methods?: string[];\n condition?: string;\n }): Promise<void> {\n const nameInput = await this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"name\"]' }))();\n const pathOperatorInput = await this.locatorFor(MatSelectHarness.with({ selector: '[formControlName=\"pathOperator\"]' }))();\n const pathInput = await this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"path\"]' }))();\n const methodsInput = await this.locatorFor(GioFormTagsInputHarness.with({ selector: '[formControlName=\"methods\"]' }))();\n const conditionInput = await this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"condition\"]' }))();\n\n if (flow.name) {\n await nameInput.setValue(flow.name);\n }\n if (flow.pathOperator) {\n await pathOperatorInput.open();\n\n // Unselect all options before selecting the new one\n for (const option of await pathOperatorInput.getOptions()) {\n if (await option.isSelected()) {\n await option.click();\n }\n }\n await pathOperatorInput.clickOptions({ text: new RegExp(flow.pathOperator, 'i') });\n }\n if (flow.path) {\n await pathInput.setValue(flow.path);\n }\n if (flow.methods) {\n await methodsInput.removeTag('ALL');\n for await (const method of flow.methods) {\n await methodsInput.addTag(method);\n }\n }\n if (flow.condition) {\n await conditionInput.setValue(flow.condition);\n }\n }\n\n public async save(): Promise<void> {\n const button = await this.getSaveBtn();\n await button.click();\n }\n\n public async cancel(): Promise<void> {\n const button = await this.getCancelBtn();\n await button.click();\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ComponentHarness, parallel } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\nimport { MatInputHarness } from '@angular/material/input/testing';\nimport { MatSelectHarness } from '@angular/material/select/testing';\n\nexport class GioPolicyStudioFlowMessageFormDialogHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flow-message-form-dialog';\n\n private getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));\n private getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));\n\n public async setFlowFormValues(flow: {\n name?: string;\n channelOperator?: string;\n channel?: string;\n operations?: string[];\n entrypoints?: string[];\n condition?: string;\n }): Promise<void> {\n const nameInput = await this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"name\"]' }))();\n const channelOperatorInput = await this.locatorFor(MatSelectHarness.with({ selector: '[formControlName=\"channelOperator\"]' }))();\n const channelInput = await this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"channel\"]' }))();\n const operationsInput = await this.locatorFor(MatSelectHarness.with({ selector: '[formControlName=\"operations\"]' }))();\n const entrypointsInput = await this.locatorFor(MatSelectHarness.with({ selector: '[formControlName=\"entrypoints\"]' }))();\n const conditionInput = await this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"condition\"]' }))();\n\n if (flow.name) {\n await nameInput.setValue(flow.name);\n }\n if (flow.channelOperator) {\n await channelOperatorInput.open();\n // Unselect all options before selecting the new one\n for (const option of await entrypointsInput.getOptions()) {\n if (await option.isSelected()) {\n await option.click();\n }\n }\n await channelOperatorInput.clickOptions({ text: new RegExp(flow.channelOperator, 'i') });\n }\n if (flow.channel) {\n await channelInput.setValue(flow.channel);\n }\n if (flow.operations) {\n await parallel(() =>\n (flow.operations ?? []).map(async operation => {\n await operationsInput.open();\n // Unselect all options before selecting the new one\n for (const option of await operationsInput.getOptions()) {\n if (await option.isSelected()) {\n await option.click();\n }\n }\n await operationsInput.clickOptions({ text: new RegExp(operation, 'i') });\n }),\n );\n }\n if (flow.entrypoints) {\n await entrypointsInput.open();\n // Unselect all options before selecting the new one\n for (const option of await entrypointsInput.getOptions()) {\n if (await option.isSelected()) {\n await option.click();\n }\n }\n await parallel(() =>\n (flow.entrypoints ?? []).map(async entrypoint => {\n await entrypointsInput.clickOptions({ text: new RegExp(entrypoint, 'i') });\n }),\n );\n }\n if (flow.condition) {\n await conditionInput.setValue(flow.condition);\n }\n }\n\n public async save(): Promise<void> {\n const button = await this.getSaveBtn();\n await button.click();\n }\n\n public async cancel(): Promise<void> {\n const button = await this.getCancelBtn();\n await button.click();\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentHarness } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\n\nimport { ChannelSelector, ConditionSelector, Flow, HttpSelector } from './models';\nimport { GioPolicyStudioFlowsMenuHarness } from './components/flows-menu/gio-ps-flows-menu.harness';\nimport { GioPolicyStudioDetailsHarness } from './components/flow-details/gio-ps-flow-details.harness';\nimport { GioPolicyStudioFlowProxyFormDialogHarness } from './components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness';\nimport { GioPolicyStudioFlowMessageFormDialogHarness } from './components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness';\n\nexport class GioPolicyStudioHarness extends ComponentHarness {\n public static hostSelector = 'gio-policy-studio';\n\n private menuHarness = this.locatorFor(GioPolicyStudioFlowsMenuHarness);\n\n private detailsHarness = this.locatorFor(GioPolicyStudioDetailsHarness);\n\n /**\n * Add a flow to a plan or to \"Common flows\"\n *\n * @param groupName Plan name where to add the flow. You also can define \"Common flows\" to add a flow to this group.\n * @param flow Flow to add\n */\n public async addFlow(groupName: string, flow: Flow): Promise<void> {\n await (await this.menuHarness()).addFlow(new RegExp(groupName, 'i'));\n\n await this.setFlowFormDialog(flow);\n }\n\n /**\n * Edit a flow configuration\n *\n * @param flowName Flow name to edit\n * @param flow\n */\n public async editFlowConfig(flowName: string, flow: Partial<Flow>): Promise<void> {\n (await this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));\n await (await this.detailsHarness()).clickEditFlowBtn();\n\n await this.setFlowFormDialog(flow);\n }\n\n public async deleteFlow(flowName: string): Promise<void> {\n (await this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));\n await (await this.detailsHarness()).clickDeleteFlowBtn();\n }\n\n public async selectFlowInMenu(flowName: string): Promise<void> {\n await (await this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));\n }\n\n public async getFlowsMenu(): Promise<\n {\n name: string | null;\n flows: {\n name: string | null;\n isSelected: boolean;\n infos: string | null;\n }[];\n }[]\n > {\n return (await this.menuHarness()).getAllFlowsGroups();\n }\n\n public async getSelectedFlowInfos(): Promise<Record<string, (string | null)[]>> {\n return await (await this.detailsHarness()).getFlowInfos();\n }\n\n public async save(): Promise<void> {\n await (await this.locatorFor(MatButtonHarness.with({ text: /Save/ }))()).click();\n }\n\n private async setFlowFormDialog(flow: Partial<Flow>) {\n const channelSelector = flow.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector | undefined;\n const httpSelector = flow.selectors?.find(s => s.type === 'HTTP') as HttpSelector | undefined;\n const conditionSelector = flow.selectors?.find(s => s.type === 'CONDITION') as ConditionSelector | undefined;\n\n if (!!channelSelector && !!httpSelector) {\n throw new Error('Channel and HTTP selectors are not be used together.');\n }\n\n if (channelSelector) {\n const flowFormNewDialog = await this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowMessageFormDialogHarness)();\n\n const toChannelOperator = {\n STARTS_WITH: 'Starts with',\n EQUALS: 'Equals',\n };\n\n await flowFormNewDialog.setFlowFormValues({\n name: flow.name,\n channel: channelSelector?.channel,\n channelOperator: toChannelOperator[channelSelector.channelOperator],\n entrypoints: channelSelector?.entrypoints,\n operations: channelSelector?.operations,\n condition: conditionSelector?.condition,\n });\n\n await flowFormNewDialog.save();\n return;\n }\n\n if (httpSelector) {\n const flowFormNewDialog = await this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowProxyFormDialogHarness)();\n\n await flowFormNewDialog.setFlowFormValues({\n name: flow.name,\n path: httpSelector?.path,\n pathOperator: httpSelector?.pathOperator,\n methods: httpSelector?.methods,\n condition: conditionSelector?.condition,\n });\n\n await flowFormNewDialog.save();\n return;\n }\n\n throw new Error('No selector found for this flow. Needed to select Message or Proxy flow form dialog.');\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './lib/models/index-testing';\n\nexport * from './lib/gio-policy-studio.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-testing-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;SAoBgB,eAAe,CAAC,QAAoD;IAClF,MAAM,eAAe,GAAoB;QACvC,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS;QAClB,eAAe,EAAE,QAAQ;QACzB,WAAW,EAAE,CAAC,SAAS,CAAC;QACxB,UAAU,EAAE,CAAC,SAAS,CAAC;KACxB,CAAC;IAEF,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,CAAC,eAAe,CAAC;QAC5B,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,IAAI;KACd,CAAC;IAEF,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;QACxB,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;KACvB;IAED,uCACK,IAAI,GACJ,QAAQ,EACX;AACJ,CAAC;SAEe,YAAY,CAAC,QAAoD;IAC/E,MAAM,YAAY,GAAiB;QACjC,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,OAAO;QACb,YAAY,EAAE,QAAQ;QACtB,OAAO,EAAE,CAAC,KAAK,CAAC;KACjB,CAAC;IAEF,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,CAAC,YAAY,CAAC;QACzB,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ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,YAAY,CAAE,OAAO;oBAC9B,SAAS,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,SAAS;iBACxC,CAAC,CAAC;gBAEH,MAAM,iBAAiB,CAAC,IAAI,EAAE,CAAC;gBAC/B,OAAO;aACR;YAED,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAC;;KACzG;;AA3Ga,mCAAY,GAAG,mBAAmB;;AC1BlD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"gravitee-ui-policy-studio-angular-testing.mjs","sources":["../../../projects/ui-policy-studio-angular/src/lib/models/flow/Flow.fixture.ts","../../../projects/ui-policy-studio-angular/src/lib/models/flow/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/Plan.fixture.ts","../../../projects/ui-policy-studio-angular/src/lib/models/plan/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/models/index-testing.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flows-menu/gio-ps-flows-menu.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-details/gio-ps-flow-details.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.ts","../../../projects/ui-policy-studio-angular/src/lib/gio-policy-studio.harness.ts","../../../projects/ui-policy-studio-angular/src/public-testing-api.ts","../../../projects/ui-policy-studio-angular/src/gravitee-ui-policy-studio-angular-testing.ts"],"sourcesContent":["/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from 'lodash';\n\nimport { Flow } from './Flow';\nimport { ChannelSelector, HttpSelector } from './Selector';\n\nexport function fakeChannelFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow {\n const channelSelector: ChannelSelector = {\n type: 'CHANNEL',\n channel: 'channel',\n channelOperator: 'EQUALS',\n entrypoints: ['webhook'],\n operations: ['PUBLISH'],\n };\n\n const base: Flow = {\n name: 'Flow name',\n selectors: [channelSelector],\n request: [],\n response: [],\n subscribe: [],\n publish: [],\n enabled: true,\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n\nexport function fakeHttpFlow(modifier?: Partial<Flow> | ((baseApi: Flow) => Flow)): Flow {\n const httpSelector: HttpSelector = {\n type: 'HTTP',\n path: '/path',\n pathOperator: 'EQUALS',\n methods: ['GET'],\n };\n\n const base: Flow = {\n name: 'Flow name',\n selectors: [httpSelector],\n request: [],\n response: [],\n subscribe: [],\n publish: [],\n enabled: true,\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './Flow.fixture';\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isFunction } from 'lodash';\n\nimport { Plan } from './Plan';\n\nexport function fakePlan(modifier?: Partial<Plan> | ((base: Plan) => Plan)): Plan {\n const base: Plan = {\n id: 'plan-id',\n name: 'Keyless plan',\n flows: [],\n };\n\n if (isFunction(modifier)) {\n return modifier(base);\n }\n\n return {\n ...base,\n ...modifier,\n };\n}\n","/*\n * Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './Plan.fixture';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './flow/index-testing';\nexport * from './plan/index-testing';\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentHarness, parallel } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\nimport { DivHarness } from '@gravitee/ui-particles-angular/testing';\n\nexport class GioPolicyStudioFlowsMenuHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flows-menu';\n\n private locateFlowsGroups = this.locatorForAll(DivHarness.with({ selector: '.list__flowsGroup' }));\n private locateFlowByText = (text: string | RegExp) =>\n this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup__flow', text }));\n\n public locateGroupByText = (text: string | RegExp) => this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup', text }));\n\n private locateSelectedFlow = this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup__flow.selected' }));\n\n public async getAllFlowsGroups(): Promise<\n {\n name: string | null;\n flows: {\n name: string | null;\n isSelected: boolean;\n infos: string | null;\n }[];\n }[]\n > {\n const flowsGroups = await this.locateFlowsGroups();\n\n return parallel(() =>\n flowsGroups.map(async flowsGroup => {\n const flowsGroupName = await flowsGroup.getText({ childSelector: '.list__flowsGroup__header__label' });\n\n const flowsDiv = await flowsGroup.childLocatorForAll(DivHarness.with({ selector: '.list__flowsGroup__flow' }))();\n\n const flowsInfos = parallel(() =>\n flowsDiv.map(async flowDiv => {\n return {\n name: await flowDiv.getText({ childSelector: '.list__flowsGroup__flow__name' }),\n infos: await flowDiv.getText({ childSelector: '.list__flowsGroup__flow__infos' }),\n isSelected: await flowDiv.host().then(host => host.hasClass('selected')),\n };\n }),\n );\n\n return {\n name: flowsGroupName,\n flows: await flowsInfos,\n };\n }),\n );\n }\n\n public async getSelectedFlow(): Promise<{ name: string | null } | null> {\n const selectedFlow = await this.locateSelectedFlow();\n\n return selectedFlow ? { name: await selectedFlow.getText({ childSelector: '.list__flowsGroup__flow__name' }) } : null;\n }\n\n /**\n * Select a flow by it's text content\n */\n public async selectFlow(flowText: string | RegExp): Promise<void> {\n const flowsGroups = await this.locateFlowByText(flowText)();\n\n if (flowsGroups) {\n await flowsGroups.host().then(host => host.click());\n }\n }\n\n public async addFlow(groupName: string | RegExp): Promise<void> {\n const flowsGroups = await this.locateGroupByText(groupName)();\n\n if (flowsGroups) {\n await (await flowsGroups.childLocatorFor(MatButtonHarness.with({ ancestor: '.list__flowsGroup__header__addBtn' }))()).click();\n }\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentHarness, parallel } from '@angular/cdk/testing';\nimport { DivHarness, SpanHarness } from '@gravitee/ui-particles-angular/testing';\n\nexport class GioPolicyStudioDetailsInfoBarHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flow-details-info-bar';\n\n public async getInfos(): Promise<Record<string, (string | null)[]>> {\n const infosDiv = await this.locatorForAll(DivHarness.with({ selector: '.info' }))();\n\n const allKeyValue = await parallel(() =>\n infosDiv.map(async info => {\n const label = await info.childLocatorFor(SpanHarness.with({ selector: '.info__label' }))();\n const value = await info.childLocatorForAll(SpanHarness.with({ selector: '.info__value' }))();\n return { label: await label.getText(), value: await parallel(() => value.map(v => v.getText())) };\n }),\n );\n\n return allKeyValue.reduce((acc, curr) => {\n if (curr.label) {\n return { ...acc, [curr.label]: curr.value };\n }\n return acc;\n }, {} as Record<string, (string | null)[]>);\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentHarness } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\n\nimport { GioPolicyStudioDetailsInfoBarHarness } from '../flow-details-info-bar/gio-ps-flow-details-info-bar.harness';\n\nexport class GioPolicyStudioDetailsHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flow-details';\n\n public async isDisplayEmptyFlow(): Promise<boolean> {\n const hostText = await (await this.host()).text();\n return hostText.includes('No flows yet');\n }\n\n public async getFlowInfos(): Promise<Record<string, (string | null)[]>> {\n return await (await this.locatorFor(GioPolicyStudioDetailsInfoBarHarness)()).getInfos();\n }\n\n public async matchText(matcher: RegExp): Promise<boolean> {\n const hostText = await (await this.host()).text();\n return matcher.test(hostText);\n }\n\n public async clickEditFlowBtn(): Promise<void> {\n const editFlowBtn = await this.locatorFor(MatButtonHarness.with({ selector: '.header__configBtn__edit' }))();\n await editFlowBtn.click();\n }\n\n public async clickDeleteFlowBtn(): Promise<void> {\n const deleteFlowBtn = await this.locatorFor(MatButtonHarness.with({ selector: '.header__configBtn__delete' }))();\n await deleteFlowBtn.click();\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ComponentHarness } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\nimport { MatInputHarness } from '@angular/material/input/testing';\nimport { MatSelectHarness } from '@angular/material/select/testing';\nimport { GioFormTagsInputHarness } from '@gravitee/ui-particles-angular';\n\nexport type GioPolicyStudioFlowProxyHarnessData = {\n name: string;\n pathOperator: string;\n path: string;\n methods: string[];\n condition: string;\n};\n\nexport class GioPolicyStudioFlowProxyFormDialogHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flow-proxy-form-dialog';\n\n private getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));\n private getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));\n private nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"name\"]' }));\n private pathOperatorInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName=\"pathOperator\"]' }));\n private pathInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"path\"]' }));\n private methodsInput = this.locatorFor(GioFormTagsInputHarness.with({ selector: '[formControlName=\"methods\"]' }));\n private conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"condition\"]' }));\n\n public async setFlowFormValues(flow: {\n name?: string;\n pathOperator?: string;\n path?: string;\n methods?: string[];\n condition?: string;\n }): Promise<void> {\n if (flow.name) {\n const nameInput = await this.nameInput();\n await nameInput.setValue(flow.name);\n }\n if (flow.pathOperator) {\n const pathOperatorInput = await this.pathOperatorInput();\n await pathOperatorInput.open();\n\n // Unselect all options before selecting the new one\n for (const option of await pathOperatorInput.getOptions()) {\n if (await option.isSelected()) {\n await option.click();\n }\n }\n await pathOperatorInput.clickOptions({ text: new RegExp(flow.pathOperator, 'i') });\n }\n if (flow.path) {\n const input = await this.pathInput();\n await input.setValue(flow.path);\n }\n if (flow.methods) {\n const methodsInput = await this.methodsInput();\n await methodsInput.removeTag('ALL');\n for await (const method of flow.methods) {\n await methodsInput.addTag(method);\n }\n }\n if (flow.condition) {\n const conditionInput = await this.conditionInput();\n await conditionInput.setValue(flow.condition);\n }\n }\n\n public async getFlowFormValues(): Promise<GioPolicyStudioFlowProxyHarnessData> {\n return {\n name: await this.getFlowName(),\n pathOperator: await this.getPathOperator(),\n path: await this.getFlowPath(),\n methods: await this.getMethods(),\n condition: await this.getCondition(),\n };\n }\n\n public async getFlowName(): Promise<string> {\n return this.nameInput().then(input => input.getValue());\n }\n\n public async getFlowPath(): Promise<string> {\n return this.pathInput().then(input => input.getValue());\n }\n\n public async getPathOperator(): Promise<string> {\n return this.pathOperatorInput().then(input => input.getValueText());\n }\n\n public async getMethods(): Promise<string[]> {\n return this.methodsInput().then(input => input.getTags());\n }\n\n public async getCondition(): Promise<string> {\n return this.conditionInput().then(input => input.getValue());\n }\n\n public async save(): Promise<void> {\n const button = await this.getSaveBtn();\n await button.click();\n }\n\n public async cancel(): Promise<void> {\n const button = await this.getCancelBtn();\n await button.click();\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ComponentHarness, parallel } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\nimport { MatInputHarness } from '@angular/material/input/testing';\nimport { MatSelectHarness } from '@angular/material/select/testing';\n\nexport type GioPolicyStudioFlowMessageHarnessData = {\n name: string;\n channelOperator: string;\n channel: string;\n entrypoints: string[];\n operations: string[];\n condition: string;\n};\n\nexport class GioPolicyStudioFlowMessageFormDialogHarness extends ComponentHarness {\n public static hostSelector = 'gio-ps-flow-message-form-dialog';\n\n private getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));\n private getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));\n private nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"name\"]' }));\n private channelOperatorInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName=\"channelOperator\"]' }));\n private channelInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"channel\"]' }));\n private operationsInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName=\"operations\"]' }));\n private entrypointsInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName=\"entrypoints\"]' }));\n private conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName=\"condition\"]' }));\n\n public async setFlowFormValues(flow: {\n name?: string;\n channelOperator?: string;\n channel?: string;\n operations?: string[];\n entrypoints?: string[];\n condition?: string;\n }): Promise<void> {\n if (flow.name) {\n const nameInput = await this.nameInput();\n await nameInput.setValue(flow.name);\n }\n if (flow.channelOperator) {\n const channelOperatorInput = await this.channelOperatorInput();\n const entrypointsInput = await this.entrypointsInput();\n await channelOperatorInput.open();\n // Unselect all options before selecting the new one\n for (const option of await entrypointsInput.getOptions()) {\n if (await option.isSelected()) {\n await option.click();\n }\n }\n await channelOperatorInput.clickOptions({ text: new RegExp(flow.channelOperator, 'i') });\n }\n if (flow.channel) {\n const channelInput = await this.channelInput();\n await channelInput.setValue(flow.channel);\n }\n if (flow.operations) {\n const operationsInput = await this.operationsInput();\n await parallel(() =>\n (flow.operations ?? []).map(async operation => {\n await operationsInput.open();\n // Unselect all options before selecting the new one\n for (const option of await operationsInput.getOptions()) {\n if (await option.isSelected()) {\n await option.click();\n }\n }\n await operationsInput.clickOptions({ text: new RegExp(operation, 'i') });\n }),\n );\n }\n if (flow.entrypoints) {\n const entrypointsInput = await this.entrypointsInput();\n await entrypointsInput.open();\n // Unselect all options before selecting the new one\n for (const option of await entrypointsInput.getOptions()) {\n if (await option.isSelected()) {\n await option.click();\n }\n }\n await parallel(() =>\n (flow.entrypoints ?? []).map(async entrypoint => {\n await entrypointsInput.clickOptions({ text: new RegExp(entrypoint, 'i') });\n }),\n );\n }\n if (flow.condition) {\n const conditionInput = await this.conditionInput();\n await conditionInput.setValue(flow.condition);\n }\n }\n\n public async getName(): Promise<string> {\n return this.nameInput().then(input => input.getValue());\n }\n\n public async getChannelOperator(): Promise<string> {\n return this.channelOperatorInput().then(input => input.getValueText());\n }\n\n public async getChannel(): Promise<string> {\n return this.channelInput().then(input => input.getValue());\n }\n\n public async getOperations(): Promise<string> {\n return this.operationsInput().then(input => input.getValueText());\n }\n\n public async getEntrypoints(): Promise<string> {\n return this.entrypointsInput().then(input => input.getValueText());\n }\n\n public async getCondition(): Promise<string> {\n return this.conditionInput().then(input => input.getValue());\n }\n\n public async save(): Promise<void> {\n const button = await this.getSaveBtn();\n await button.click();\n }\n\n public async cancel(): Promise<void> {\n const button = await this.getCancelBtn();\n await button.click();\n }\n\n public async getFormValues(): Promise<GioPolicyStudioFlowMessageHarnessData> {\n const name = await this.getName();\n const channelOperator = await this.getChannelOperator();\n const channel = await this.getChannel();\n const entrypoints = (await this.getEntrypoints()).split(',');\n const operations = (await this.getOperations()).split(',');\n const condition = await this.getCondition();\n return {\n name,\n channel,\n channelOperator,\n entrypoints,\n operations,\n condition,\n };\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ComponentHarness } from '@angular/cdk/testing';\nimport { MatButtonHarness } from '@angular/material/button/testing';\n\nimport { ChannelSelector, ConditionSelector, Flow, HttpSelector } from './models';\nimport { GioPolicyStudioFlowsMenuHarness } from './components/flows-menu/gio-ps-flows-menu.harness';\nimport { GioPolicyStudioDetailsHarness } from './components/flow-details/gio-ps-flow-details.harness';\nimport { GioPolicyStudioFlowProxyFormDialogHarness } from './components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness';\nimport { GioPolicyStudioFlowMessageFormDialogHarness } from './components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness';\n\nexport class GioPolicyStudioHarness extends ComponentHarness {\n public static hostSelector = 'gio-policy-studio';\n\n private menuHarness = this.locatorFor(GioPolicyStudioFlowsMenuHarness);\n\n private detailsHarness = this.locatorFor(GioPolicyStudioDetailsHarness);\n\n /**\n * Add a flow to a plan or to \"Common flows\"\n *\n * @param groupName Plan name where to add the flow. You also can define \"Common flows\" to add a flow to this group.\n * @param flow Flow to add\n */\n public async addFlow(groupName: string, flow: Flow): Promise<void> {\n await (await this.menuHarness()).addFlow(new RegExp(groupName, 'i'));\n\n await this.setFlowFormDialog(flow);\n }\n\n /**\n * Edit a flow configuration\n *\n * @param flowName Flow name to edit\n * @param flow\n */\n public async editFlowConfig(flowName: string, flow: Partial<Flow>): Promise<void> {\n (await this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));\n await (await this.detailsHarness()).clickEditFlowBtn();\n\n await this.setFlowFormDialog(flow);\n }\n\n public async deleteFlow(flowName: string): Promise<void> {\n (await this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));\n await (await this.detailsHarness()).clickDeleteFlowBtn();\n }\n\n public async selectFlowInMenu(flowName: string): Promise<void> {\n await (await this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));\n }\n\n public async getFlowsMenu(): Promise<\n {\n name: string | null;\n flows: {\n name: string | null;\n isSelected: boolean;\n infos: string | null;\n }[];\n }[]\n > {\n return (await this.menuHarness()).getAllFlowsGroups();\n }\n\n public async getSelectedFlowInfos(): Promise<Record<string, (string | null)[]>> {\n return await (await this.detailsHarness()).getFlowInfos();\n }\n\n public async save(): Promise<void> {\n await (await this.locatorFor(MatButtonHarness.with({ text: /Save/ }))()).click();\n }\n\n private async setFlowFormDialog(flow: Partial<Flow>) {\n const channelSelector = flow.selectors?.find(s => s.type === 'CHANNEL') as ChannelSelector | undefined;\n const httpSelector = flow.selectors?.find(s => s.type === 'HTTP') as HttpSelector | undefined;\n const conditionSelector = flow.selectors?.find(s => s.type === 'CONDITION') as ConditionSelector | undefined;\n\n if (!!channelSelector && !!httpSelector) {\n throw new Error('Channel and HTTP selectors are not be used together.');\n }\n\n if (channelSelector) {\n const flowFormNewDialog = await this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowMessageFormDialogHarness)();\n\n const toChannelOperator = {\n STARTS_WITH: 'Starts with',\n EQUALS: 'Equals',\n };\n\n await flowFormNewDialog.setFlowFormValues({\n name: flow.name,\n channel: channelSelector?.channel,\n channelOperator: toChannelOperator[channelSelector.channelOperator],\n entrypoints: channelSelector?.entrypoints,\n operations: channelSelector?.operations,\n condition: conditionSelector?.condition,\n });\n\n await flowFormNewDialog.save();\n return;\n }\n\n if (httpSelector) {\n const flowFormNewDialog = await this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowProxyFormDialogHarness)();\n\n await flowFormNewDialog.setFlowFormValues({\n name: flow.name,\n path: httpSelector?.path,\n pathOperator: httpSelector?.pathOperator,\n methods: httpSelector?.methods,\n condition: conditionSelector?.condition,\n });\n\n await flowFormNewDialog.save();\n return;\n }\n\n throw new Error('No selector found for this flow. Needed to select Message or Proxy flow form dialog.');\n }\n}\n","/*\n * Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './lib/models/index-testing';\n\nexport * from './lib/gio-policy-studio.harness';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-testing-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;SAoBgB,eAAe,CAAC,QAAoD;IAClF,MAAM,eAAe,GAAoB;QACvC,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS;QAClB,eAAe,EAAE,QAAQ;QACzB,WAAW,EAAE,CAAC,SAAS,CAAC;QACxB,UAAU,EAAE,CAAC,SAAS,CAAC;KACxB,CAAC;IAEF,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,CAAC,eAAe,CAAC;QAC5B,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,IAAI;KACd,CAAC;IAEF,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;QACxB,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;KACvB;IAED,uCACK,IAAI,GACJ,QAAQ,EACX;AACJ,CAAC;SAEe,YAAY,CAAC,QAAoD;IAC/E,MAAM,YAAY,GAAiB;QACjC,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,OAAO;QACb,YAAY,EAAE,QAAQ;QACtB,OAAO,EAAE,CAAC,KAAK,CAAC;KACjB,CAAC;IAEF,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,CAAC,YAAY,CAAC;QACzB,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,IAAI;KACd,CAAC;IAEF,IAAI,UAAU,CAA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AC,UAAU,CAAC,yCAAyC,CAAC,EAAE,CAAC;gBAE1H,MAAM,iBAAiB,CAAC,iBAAiB,CAAC;oBACxC,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI;oBACxB,YAAY,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY;oBACxC,OAAO,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO;oBAC9B,SAAS,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,SAAS;iBACxC,CAAC,CAAC;gBAEH,MAAM,iBAAiB,CAAC,IAAI,EAAE,CAAC;gBAC/B,OAAO;aACR;YAED,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAC;;KACzG;;AA3Ga,mCAAY,GAAG,mBAAmB;;AC1BlD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
|
@@ -41,6 +41,32 @@ import { tap } from 'rxjs/operators';
|
|
|
41
41
|
* limitations under the License.
|
|
42
42
|
*/
|
|
43
43
|
const HttpMethods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE', 'OTHER'];
|
|
44
|
+
const toHttpMethod = (value) => {
|
|
45
|
+
switch (value) {
|
|
46
|
+
case 'CONNECT':
|
|
47
|
+
return 'CONNECT';
|
|
48
|
+
case 'DELETE':
|
|
49
|
+
return 'DELETE';
|
|
50
|
+
case 'GET':
|
|
51
|
+
return 'GET';
|
|
52
|
+
case 'HEAD':
|
|
53
|
+
return 'HEAD';
|
|
54
|
+
case 'OPTIONS':
|
|
55
|
+
return 'OPTIONS';
|
|
56
|
+
case 'PATCH':
|
|
57
|
+
return 'PATCH';
|
|
58
|
+
case 'POST':
|
|
59
|
+
return 'POST';
|
|
60
|
+
case 'PUT':
|
|
61
|
+
return 'PUT';
|
|
62
|
+
case 'TRACE':
|
|
63
|
+
return 'TRACE';
|
|
64
|
+
case 'OTHER':
|
|
65
|
+
return 'OTHER';
|
|
66
|
+
default:
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
44
70
|
|
|
45
71
|
/*
|
|
46
72
|
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
@@ -181,7 +207,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
181
207
|
const METHODS_AUTOCOMPLETE = ['ALL', ...HttpMethods];
|
|
182
208
|
class GioPolicyStudioFlowProxyFormDialogComponent {
|
|
183
209
|
constructor(dialogRef, flowDialogData) {
|
|
184
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
210
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
185
211
|
this.dialogRef = dialogRef;
|
|
186
212
|
this.mode = 'create';
|
|
187
213
|
this.methods = METHODS_AUTOCOMPLETE;
|
|
@@ -192,16 +218,16 @@ class GioPolicyStudioFlowProxyFormDialogComponent {
|
|
|
192
218
|
this.flowFormGroup = new FormGroup({
|
|
193
219
|
name: new FormControl((_f = (_e = flowDialogData === null || flowDialogData === void 0 ? void 0 : flowDialogData.flow) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : ''),
|
|
194
220
|
pathOperator: new FormControl((_g = httpSelector === null || httpSelector === void 0 ? void 0 : httpSelector.pathOperator) !== null && _g !== void 0 ? _g : 'EQUALS'),
|
|
195
|
-
path: new FormControl((
|
|
221
|
+
path: new FormControl(sanitizePathFormValue(httpSelector === null || httpSelector === void 0 ? void 0 : httpSelector.path)),
|
|
196
222
|
methods: new FormControl(sanitizeMethodFormValue(httpSelector === null || httpSelector === void 0 ? void 0 : httpSelector.methods)),
|
|
197
|
-
condition: new FormControl((
|
|
223
|
+
condition: new FormControl((_h = conditionSelector === null || conditionSelector === void 0 ? void 0 : conditionSelector.condition) !== null && _h !== void 0 ? _h : ''),
|
|
198
224
|
});
|
|
199
225
|
}
|
|
200
226
|
onSubmit() {
|
|
201
227
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
202
228
|
const httpSelectorToSave = {
|
|
203
229
|
type: 'HTTP',
|
|
204
|
-
path: (_b = (_a = this.flowFormGroup) === null || _a === void 0 ? void 0 : _a.get('path')) === null || _b === void 0 ? void 0 : _b.value,
|
|
230
|
+
path: sanitizePath((_b = (_a = this.flowFormGroup) === null || _a === void 0 ? void 0 : _a.get('path')) === null || _b === void 0 ? void 0 : _b.value),
|
|
205
231
|
pathOperator: (_d = (_c = this.flowFormGroup) === null || _c === void 0 ? void 0 : _c.get('pathOperator')) === null || _d === void 0 ? void 0 : _d.value,
|
|
206
232
|
methods: sanitizeMethods((_f = (_e = this.flowFormGroup) === null || _e === void 0 ? void 0 : _e.get('methods')) === null || _f === void 0 ? void 0 : _f.value),
|
|
207
233
|
};
|
|
@@ -226,10 +252,10 @@ class GioPolicyStudioFlowProxyFormDialogComponent {
|
|
|
226
252
|
}
|
|
227
253
|
}
|
|
228
254
|
GioPolicyStudioFlowProxyFormDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioFlowProxyFormDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
229
|
-
GioPolicyStudioFlowProxyFormDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioFlowProxyFormDialogComponent, selector: "gio-ps-flow-proxy-form-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n {{ mode === 'create' ? 'Create a new flow' : 'Edit flow' }}\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"false\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"flowFormGroup\" class=\"content\" [formGroup]=\"flowFormGroup\">\n <p>\n Flows allow you to apply different policies per HTTP path and/or method. For example you can reroute calls based on the URL specified.\n </p>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Flow name</mat-label>\n <input matInput formControlName=\"name\" cdkFocusInitial />\n <mat-hint>Names will be automatically generated with path and method if left blank</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n <mat-select formControlName=\"pathOperator\">\n <mat-option value=\"EQUALS\">Equals</mat-option>\n <mat-option value=\"STARTS_WITH\">Starts with</mat-option>\n </mat-select>\n <mat-hint>Path operator</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Path</mat-label>\n <input matInput formControlName=\"path\" />\n <mat-hint>Path</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Methods for your flow</mat-label>\n <gio-form-tags-input\n formControlName=\"methods\"\n [autocompleteOptions]=\"methods\"\n [tagValidationHook]=\"tagValidationHook\"\n ></gio-form-tags-input>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Condition</mat-label>\n <input matInput formControlName=\"condition\" />\n <mat-hint>Condition to execute the flow, supports Expression Language</mat-hint>\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"false\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSubmit()\">\n {{ mode === 'create' ? 'Create' : 'Save' }}\n </button>\n</mat-dialog-actions>\n", styles: [".title__closeBtn{top:-20px;right:-20px;float:right}.content__row{display:flex;gap:16px}.content__row mat-form-field{flex:1 1 auto}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.GioFormTagsInputComponent, selector: "gio-form-tags-input", inputs: ["aria-label", "addOnBlur", "tagValidationHook", "autocompleteOptions", "placeholder", "required", "disabled"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.MatLabel, selector: "mat-label" }, { type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
|
|
255
|
+
GioPolicyStudioFlowProxyFormDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioPolicyStudioFlowProxyFormDialogComponent, selector: "gio-ps-flow-proxy-form-dialog", ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n {{ mode === 'create' ? 'Create a new flow' : 'Edit flow' }}\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"false\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"flowFormGroup\" class=\"content\" [formGroup]=\"flowFormGroup\">\n <p>\n Flows allow you to apply different policies per HTTP path and/or method. For example you can reroute calls based on the URL specified.\n </p>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Flow name</mat-label>\n <input matInput formControlName=\"name\" cdkFocusInitial />\n <mat-hint>Names will be automatically generated with path and method if left blank</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n <mat-select formControlName=\"pathOperator\">\n <mat-option value=\"EQUALS\">Equals</mat-option>\n <mat-option value=\"STARTS_WITH\">Starts with</mat-option>\n </mat-select>\n <mat-hint>Path operator</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Path</mat-label>\n <span matPrefix>/</span>\n <input matInput formControlName=\"path\" />\n <mat-hint>Path</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Methods for your flow</mat-label>\n <gio-form-tags-input\n formControlName=\"methods\"\n [autocompleteOptions]=\"methods\"\n [tagValidationHook]=\"tagValidationHook\"\n ></gio-form-tags-input>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Condition</mat-label>\n <input matInput formControlName=\"condition\" />\n <mat-hint>Condition to execute the flow, supports Expression Language</mat-hint>\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"false\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSubmit()\">\n {{ mode === 'create' ? 'Create' : 'Save' }}\n </button>\n</mat-dialog-actions>\n", styles: [".title__closeBtn{top:-20px;right:-20px;float:right}.content__row{display:flex;gap:16px}.content__row mat-form-field{flex:1 1 auto}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.GioFormTagsInputComponent, selector: "gio-form-tags-input", inputs: ["aria-label", "addOnBlur", "tagValidationHook", "autocompleteOptions", "placeholder", "required", "disabled"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.MatLabel, selector: "mat-label" }, { type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4.MatPrefix, selector: "[matPrefix]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
|
|
230
256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioPolicyStudioFlowProxyFormDialogComponent, decorators: [{
|
|
231
257
|
type: Component,
|
|
232
|
-
args: [{ selector: 'gio-ps-flow-proxy-form-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n {{ mode === 'create' ? 'Create a new flow' : 'Edit flow' }}\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"false\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"flowFormGroup\" class=\"content\" [formGroup]=\"flowFormGroup\">\n <p>\n Flows allow you to apply different policies per HTTP path and/or method. For example you can reroute calls based on the URL specified.\n </p>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Flow name</mat-label>\n <input matInput formControlName=\"name\" cdkFocusInitial />\n <mat-hint>Names will be automatically generated with path and method if left blank</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n <mat-select formControlName=\"pathOperator\">\n <mat-option value=\"EQUALS\">Equals</mat-option>\n <mat-option value=\"STARTS_WITH\">Starts with</mat-option>\n </mat-select>\n <mat-hint>Path operator</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Path</mat-label>\n <input matInput formControlName=\"path\" />\n <mat-hint>Path</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Methods for your flow</mat-label>\n <gio-form-tags-input\n formControlName=\"methods\"\n [autocompleteOptions]=\"methods\"\n [tagValidationHook]=\"tagValidationHook\"\n ></gio-form-tags-input>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Condition</mat-label>\n <input matInput formControlName=\"condition\" />\n <mat-hint>Condition to execute the flow, supports Expression Language</mat-hint>\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"false\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSubmit()\">\n {{ mode === 'create' ? 'Create' : 'Save' }}\n </button>\n</mat-dialog-actions>\n", styles: [".title__closeBtn{top:-20px;right:-20px;float:right}.content__row{display:flex;gap:16px}.content__row mat-form-field{flex:1 1 auto}\n"] }]
|
|
258
|
+
args: [{ selector: 'gio-ps-flow-proxy-form-dialog', template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<h2 mat-dialog-title class=\"title\">\n {{ mode === 'create' ? 'Create a new flow' : 'Edit flow' }}\n\n <button class=\"title__closeBtn\" mat-icon-button aria-label=\"Close dialog\" [mat-dialog-close]=\"false\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n</h2>\n\n<mat-dialog-content *ngIf=\"flowFormGroup\" class=\"content\" [formGroup]=\"flowFormGroup\">\n <p>\n Flows allow you to apply different policies per HTTP path and/or method. For example you can reroute calls based on the URL specified.\n </p>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Flow name</mat-label>\n <input matInput formControlName=\"name\" cdkFocusInitial />\n <mat-hint>Names will be automatically generated with path and method if left blank</mat-hint>\n </mat-form-field>\n </div>\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n <mat-select formControlName=\"pathOperator\">\n <mat-option value=\"EQUALS\">Equals</mat-option>\n <mat-option value=\"STARTS_WITH\">Starts with</mat-option>\n </mat-select>\n <mat-hint>Path operator</mat-hint>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Path</mat-label>\n <span matPrefix>/</span>\n <input matInput formControlName=\"path\" />\n <mat-hint>Path</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Methods for your flow</mat-label>\n <gio-form-tags-input\n formControlName=\"methods\"\n [autocompleteOptions]=\"methods\"\n [tagValidationHook]=\"tagValidationHook\"\n ></gio-form-tags-input>\n </mat-form-field>\n </div>\n\n <div class=\"content__row\">\n <mat-form-field>\n <mat-label>Condition</mat-label>\n <input matInput formControlName=\"condition\" />\n <mat-hint>Condition to execute the flow, supports Expression Language</mat-hint>\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"actions\">\n <button class=\"actions__cancelBtn\" mat-flat-button [mat-dialog-close]=\"false\">Cancel</button>\n <button class=\"actions__saveBtn\" color=\"primary\" mat-stroked-button role=\"dialog\" (click)=\"onSubmit()\">\n {{ mode === 'create' ? 'Create' : 'Save' }}\n </button>\n</mat-dialog-actions>\n", styles: [".title__closeBtn{top:-20px;right:-20px;float:right}.content__row{display:flex;gap:16px}.content__row mat-form-field{flex:1 1 auto}\n"] }]
|
|
233
259
|
}], ctorParameters: function () {
|
|
234
260
|
return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
235
261
|
type: Inject,
|
|
@@ -246,6 +272,18 @@ const sanitizeMethodFormValue = (methods) => {
|
|
|
246
272
|
return ['ALL'];
|
|
247
273
|
return methods;
|
|
248
274
|
};
|
|
275
|
+
const sanitizePath = (path) => {
|
|
276
|
+
if (!path || !path.startsWith('/')) {
|
|
277
|
+
return `/${path}`;
|
|
278
|
+
}
|
|
279
|
+
return path;
|
|
280
|
+
};
|
|
281
|
+
const sanitizePathFormValue = (path) => {
|
|
282
|
+
if (path && path.startsWith('/')) {
|
|
283
|
+
return path.substring(1);
|
|
284
|
+
}
|
|
285
|
+
return path !== null && path !== void 0 ? path : '';
|
|
286
|
+
};
|
|
249
287
|
|
|
250
288
|
/*
|
|
251
289
|
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
@@ -879,5 +917,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
879
917
|
* Generated bundle index. Do not edit.
|
|
880
918
|
*/
|
|
881
919
|
|
|
882
|
-
export { GioPolicyStudioComponent, GioPolicyStudioModule, HttpMethods };
|
|
920
|
+
export { GioPolicyStudioComponent, GioPolicyStudioModule, HttpMethods, toHttpMethod };
|
|
883
921
|
//# sourceMappingURL=gravitee-ui-policy-studio-angular.mjs.map
|