@gravitee/ui-policy-studio-angular 9.6.0-angular-16-c8d84dc → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{esm2022 → esm2020}/lib/components/filter-pipe/gio-flter-connectors-by-mode.pipe.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/flow-details/gio-ps-flow-details.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/flows-menu/gio-ps-flows-menu.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/components/step-form/gio-ps-step-form.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/gio-policy-studio.component.mjs +4 -4
- package/{esm2022 → esm2020}/lib/gio-policy-studio.module.mjs +53 -53
- package/{esm2022 → esm2020}/lib/gio-policy-studio.service.mjs +4 -4
- package/esm2020/testing/lib/components/flow-details/gio-ps-flow-details.harness.mjs +41 -0
- package/esm2020/testing/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.harness.mjs +35 -0
- package/esm2020/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.mjs +126 -0
- package/esm2020/testing/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.harness.mjs +50 -0
- package/esm2020/testing/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.harness.mjs +60 -0
- package/esm2020/testing/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.mjs +128 -0
- package/esm2020/testing/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.mjs +98 -0
- package/esm2020/testing/lib/components/flows-menu/gio-ps-flows-menu.harness.mjs +71 -0
- package/esm2020/testing/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.harness.mjs +87 -0
- package/{esm2022 → esm2020}/testing/lib/components/step-edit-dialog/gio-ps-step-edit-dialog.harness.mjs +2 -2
- package/esm2020/testing/lib/components/step-form/gio-ps-step-form.harness.mjs +49 -0
- package/esm2020/testing/lib/gio-policy-studio.harness.mjs +161 -0
- package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs +1443 -0
- package/fesm2015/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -0
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs +1645 -0
- package/fesm2015/gravitee-ui-policy-studio-angular.mjs.map +1 -0
- package/{fesm2022 → fesm2020}/gravitee-ui-policy-studio-angular-testing.mjs +12 -12
- package/{fesm2022 → fesm2020}/gravitee-ui-policy-studio-angular-testing.mjs.map +1 -1
- package/{fesm2022 → fesm2020}/gravitee-ui-policy-studio-angular.mjs +94 -94
- package/{fesm2022 → fesm2020}/gravitee-ui-policy-studio-angular.mjs.map +1 -1
- package/lib/components/flow-details/gio-ps-flow-details.component.d.ts +1 -1
- package/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.component.d.ts +1 -1
- package/lib/components/flow-details-phase/gio-ps-flow-details-phase.component.d.ts +1 -1
- package/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.component.d.ts +1 -1
- package/lib/components/flows-menu/gio-ps-flows-menu.component.d.ts +1 -1
- package/lib/components/step-form/gio-ps-step-form.component.d.ts +1 -1
- package/lib/gio-policy-studio.component.d.ts +1 -1
- package/package.json +22 -14
- package/esm2022/testing/lib/components/flow-details/gio-ps-flow-details.harness.mjs +0 -41
- package/esm2022/testing/lib/components/flow-details-info-bar/gio-ps-flow-details-info-bar.harness.mjs +0 -35
- package/esm2022/testing/lib/components/flow-details-phase/gio-ps-flow-details-phase.harness.mjs +0 -126
- package/esm2022/testing/lib/components/flow-details-phase-step/gio-ps-flow-details-phase-step.harness.mjs +0 -50
- package/esm2022/testing/lib/components/flow-execution-form-dialog/gio-ps-flow-execution-form-dialog.harness.mjs +0 -60
- package/esm2022/testing/lib/components/flow-form-dialog/flow-message-form-dialog/gio-ps-flow-message-form-dialog.harness.mjs +0 -128
- package/esm2022/testing/lib/components/flow-form-dialog/flow-proxy-form-dialog/gio-ps-flow-proxy-form-dialog.harness.mjs +0 -98
- package/esm2022/testing/lib/components/flows-menu/gio-ps-flows-menu.harness.mjs +0 -71
- package/esm2022/testing/lib/components/policies-catalog-dialog/gio-ps-policies-catalog-dialog.harness.mjs +0 -87
- package/esm2022/testing/lib/components/step-form/gio-ps-step-form.harness.mjs +0 -49
- package/esm2022/testing/lib/gio-policy-studio.harness.mjs +0 -161
- /package/{esm2022 → esm2020}/gravitee-ui-policy-studio-angular.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/components/flow-form-dialog/gio-ps-flow-form-dialog-result.model.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/gio-policy-studio.model.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/ConnectorsInfo.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/PolicySchemaFetcher.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/SaveOutput.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/flow/ApiType.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/flow/Flow.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/flow/FlowExecution.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/flow/HttpMethod.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/flow/Selector.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/flow/Step.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/flow/index.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/index.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/plan/Plan.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/plan/index.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/policy/Policy.mjs +0 -0
- /package/{esm2022 → esm2020}/lib/models/policy/index.mjs +0 -0
- /package/{esm2022 → esm2020}/public-api.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/gravitee-ui-policy-studio-angular-testing.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/ConnectorsInfo.fixture.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/ConnectorsInfo.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/PolicySchemaFetcher.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/SaveOutput.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/ApiType.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/Flow.fixture.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/Flow.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/FlowExecution.fixture.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/FlowExecution.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/HttpMethod.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/Selector.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/Step.fixture.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/Step.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/index-testing.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/flow/index.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/index-testing.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/index.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/plan/Plan.fixture.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/plan/Plan.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/plan/index-testing.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/plan/index.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/policy/Policy.fixture.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/policy/Policy.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/policy/index-testing.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/lib/models/policy/index.mjs +0 -0
- /package/{esm2022 → esm2020}/testing/public-testing-api.mjs +0 -0
|
@@ -0,0 +1,1443 @@
|
|
|
1
|
+
import { isFunction, isEmpty } from 'lodash';
|
|
2
|
+
import { __awaiter } from 'tslib';
|
|
3
|
+
import { ComponentHarness, parallel, HarnessPredicate } from '@angular/cdk/testing';
|
|
4
|
+
import { MatButtonHarness } from '@angular/material/button/testing';
|
|
5
|
+
import { MatTabGroupHarness } from '@angular/material/tabs/testing';
|
|
6
|
+
import { MatIconHarness } from '@angular/material/icon/testing';
|
|
7
|
+
import { DivHarness, SpanHarness } from '@gravitee/ui-particles-angular/testing';
|
|
8
|
+
import { MatInputHarness } from '@angular/material/input/testing';
|
|
9
|
+
import { MatSelectHarness } from '@angular/material/select/testing';
|
|
10
|
+
import { GioFormTagsInputHarness } from '@gravitee/ui-particles-angular';
|
|
11
|
+
import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing';
|
|
12
|
+
import { MatMenuHarness } from '@angular/material/menu/testing';
|
|
13
|
+
import { MatChipListboxHarness } from '@angular/material/chips/testing';
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
17
|
+
*
|
|
18
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
* you may not use this file except in compliance with the License.
|
|
20
|
+
* You may obtain a copy of the License at
|
|
21
|
+
*
|
|
22
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
25
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
26
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
|
+
* See the License for the specific language governing permissions and
|
|
28
|
+
* limitations under the License.
|
|
29
|
+
*/
|
|
30
|
+
function fakeChannelFlow(modifier) {
|
|
31
|
+
const channelSelector = {
|
|
32
|
+
type: 'CHANNEL',
|
|
33
|
+
channel: 'channel',
|
|
34
|
+
channelOperator: 'EQUALS',
|
|
35
|
+
entrypoints: ['webhook'],
|
|
36
|
+
operations: ['PUBLISH'],
|
|
37
|
+
};
|
|
38
|
+
const base = {
|
|
39
|
+
name: 'Flow name',
|
|
40
|
+
selectors: [channelSelector],
|
|
41
|
+
request: [],
|
|
42
|
+
response: [],
|
|
43
|
+
subscribe: [],
|
|
44
|
+
publish: [],
|
|
45
|
+
enabled: true,
|
|
46
|
+
};
|
|
47
|
+
if (isFunction(modifier)) {
|
|
48
|
+
return modifier(base);
|
|
49
|
+
}
|
|
50
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
51
|
+
}
|
|
52
|
+
function fakeConditionedChannelFlow(modifier) {
|
|
53
|
+
const base = fakeChannelFlow((baseApi) => {
|
|
54
|
+
var _a;
|
|
55
|
+
return (Object.assign(Object.assign({}, baseApi), { name: 'Conditioned flow', selectors: [
|
|
56
|
+
...((_a = baseApi.selectors) !== null && _a !== void 0 ? _a : []),
|
|
57
|
+
{
|
|
58
|
+
type: 'CONDITION',
|
|
59
|
+
condition: 'false',
|
|
60
|
+
},
|
|
61
|
+
] }));
|
|
62
|
+
});
|
|
63
|
+
if (isFunction(modifier)) {
|
|
64
|
+
return modifier(base);
|
|
65
|
+
}
|
|
66
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
67
|
+
}
|
|
68
|
+
function fakeHttpFlow(modifier) {
|
|
69
|
+
const httpSelector = {
|
|
70
|
+
type: 'HTTP',
|
|
71
|
+
path: '/path',
|
|
72
|
+
pathOperator: 'EQUALS',
|
|
73
|
+
methods: ['GET'],
|
|
74
|
+
};
|
|
75
|
+
const base = {
|
|
76
|
+
name: 'Flow name',
|
|
77
|
+
selectors: [httpSelector],
|
|
78
|
+
request: [],
|
|
79
|
+
response: [],
|
|
80
|
+
subscribe: [],
|
|
81
|
+
publish: [],
|
|
82
|
+
enabled: true,
|
|
83
|
+
};
|
|
84
|
+
if (isFunction(modifier)) {
|
|
85
|
+
return modifier(base);
|
|
86
|
+
}
|
|
87
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
88
|
+
}
|
|
89
|
+
function fakeConditionedHttpFlow(modifier) {
|
|
90
|
+
const base = fakeHttpFlow((baseApi) => {
|
|
91
|
+
var _a;
|
|
92
|
+
return (Object.assign(Object.assign({}, baseApi), { name: 'Conditioned flow', selectors: [
|
|
93
|
+
...((_a = baseApi.selectors) !== null && _a !== void 0 ? _a : []),
|
|
94
|
+
{
|
|
95
|
+
type: 'CONDITION',
|
|
96
|
+
condition: 'false',
|
|
97
|
+
},
|
|
98
|
+
] }));
|
|
99
|
+
});
|
|
100
|
+
if (isFunction(modifier)) {
|
|
101
|
+
return modifier(base);
|
|
102
|
+
}
|
|
103
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
108
|
+
*
|
|
109
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110
|
+
* you may not use this file except in compliance with the License.
|
|
111
|
+
* You may obtain a copy of the License at
|
|
112
|
+
*
|
|
113
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
114
|
+
*
|
|
115
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
116
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
117
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
118
|
+
* See the License for the specific language governing permissions and
|
|
119
|
+
* limitations under the License.
|
|
120
|
+
*/
|
|
121
|
+
function fakeBestMatchFlowExecution(modifier) {
|
|
122
|
+
const base = {
|
|
123
|
+
mode: 'BEST_MATCH',
|
|
124
|
+
matchRequired: false,
|
|
125
|
+
};
|
|
126
|
+
if (isFunction(modifier)) {
|
|
127
|
+
return modifier(base);
|
|
128
|
+
}
|
|
129
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
130
|
+
}
|
|
131
|
+
function fakeDefaultFlowExecution(modifier) {
|
|
132
|
+
const base = {
|
|
133
|
+
mode: 'DEFAULT',
|
|
134
|
+
matchRequired: false,
|
|
135
|
+
};
|
|
136
|
+
if (isFunction(modifier)) {
|
|
137
|
+
return modifier(base);
|
|
138
|
+
}
|
|
139
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/*
|
|
143
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
144
|
+
*
|
|
145
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
146
|
+
* you may not use this file except in compliance with the License.
|
|
147
|
+
* You may obtain a copy of the License at
|
|
148
|
+
*
|
|
149
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
150
|
+
*
|
|
151
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
152
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
153
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
154
|
+
* See the License for the specific language governing permissions and
|
|
155
|
+
* limitations under the License.
|
|
156
|
+
*/
|
|
157
|
+
// 09/06/2023 - All API V4 available policies.
|
|
158
|
+
const POLICIES_V4_UNREGISTERED_ICON = [
|
|
159
|
+
{
|
|
160
|
+
id: 'message-filtering',
|
|
161
|
+
name: 'Message Filtering',
|
|
162
|
+
description: 'Message Filtering Gravitee Policy',
|
|
163
|
+
category: 'others',
|
|
164
|
+
version: '1.1.1',
|
|
165
|
+
proxy: [],
|
|
166
|
+
message: ['MESSAGE_RESPONSE', 'MESSAGE_REQUEST'],
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: 'json-xml',
|
|
170
|
+
name: 'JSON to XML',
|
|
171
|
+
description: 'Description of the JSON to XML Transformation Gravitee Policy',
|
|
172
|
+
icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAuNzEgMTEyLjgyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6Izg2YzNkMDt9LmNscy0ye2ZpbGw6I2ZmZjt9LmNscy0ze2ZvbnQtc2l6ZToxMnB4O2ZpbGw6IzFkMWQxYjtmb250LWZhbWlseTpNeXJpYWRQcm8tUmVndWxhciwgTXlyaWFkIFBybzt9LmNscy00e2xldHRlci1zcGFjaW5nOi0wLjAxZW07fTwvc3R5bGU+PC9kZWZzPjxnIGlkPSJBUEkiPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTUwLjM1LDEzLjM3YTQzLDQzLDAsMSwwLDQzLjA1LDQzQTQzLDQzLDAsMCwwLDUwLjM1LDEzLjM3WiIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTUxLjUsNjQuOTJBNi41Myw2LjUzLDAsMSwxLDU4LDU4LjM5LDYuNTMsNi41MywwLDAsMSw1MS41LDY0LjkyWm0wLTExLjM0YTQuODEsNC44MSwwLDEsMCw0LjgxLDQuODFBN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tMUEyMC40NywyMC40NywwLDAsMSw0Miw0MC4zM2EuODYuODYsMCwxLDEsLjgsMS41MkExOC43NywxOC43NywwLDAsMCwzMyw1NS42MS44Ni44NiwwLDAsMSwzMi4xOCw1Ni4zNVoiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik01MS41LDc4Ljc5YTIwLjE3LDIwLjE3LDAsMCwxLTEyLjI3LTQuMTEuODYuODYsMCwwLDEtLjE3LTEuMjEuODUuODUsMCwwLDEsMS4yLS4xNkExOC41MiwxOC41MiwwLDAsMCw1MS41LDc3LjA3LDE4LjIzLDE4LjIzLDAsMCwwLDU1LDc2LjczYS44Ny44NywwLDAsMSwuMzMsMS43QTIwLjg3LDIwLjg3LDAsMCwxLDUxLjUsNzguNzlaIi8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNzAsNjUuNDJhLjg0Ljg0LDAsMCwxLS4yNywwLC44Ni44NiwwLDAsMS0uNTQtMS4wOSwxOC43MSwxOC43MSwwLDAsMC04LjU1LTIyLjE3Ljg2Ljg2LDAsMSwxLC44NS0xLjUsMjAuNDIsMjAuNDIsMCwwLDEsOS4zMywyNC4yMUEuODcuODcsMCwwLDEsNzAsNjUuNDJaIi8+PC9nPjxnIGlkPSJIT1NUSU5HIj48dGV4dCBjbGFzcz0iY2xzLTMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE3LjkzIC00Ljk4KSI+WE1MIDx0c3BhbiBjbGFzcz0iY2xzLTQiIHg9IjI0LjcxIiB5PSIwIj50PC90c3Bhbj48dHNwYW4geD0iMjguNjEiIHk9IjAiPm8gSlNPTjwvdHNwYW4+PC90ZXh0PjwvZz48L3N2Zz4=',
|
|
173
|
+
category: 'transformation',
|
|
174
|
+
version: '2.1.4',
|
|
175
|
+
proxy: ['REQUEST', 'RESPONSE'],
|
|
176
|
+
message: ['MESSAGE_RESPONSE', 'MESSAGE_REQUEST'],
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: 'avro-json',
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NTZjNy4yNTAyNDAzLDEzLjEwNTU0NSwyMS43OTM3MzkzLDI1LjE5NTA5ODksMzQuNjYwMzI3OSwzMS4xMzIxMTA2YzguMTc5NjQ5NCwxNC4zNjc5NTA0LDE3LjczMDE4NjUsMTMuMDAwNzAxOSw0NS44NDgxMTQsMTMuNjc0MDExMmwtODMuMTc3MzY4Miw1Ni42NzAzMTg2aDQzNS44ODU5MjUzbC04My41MjE0ODQ0LTU2LjY3MDMxODZjMjguMTE3OTUwNC0wLjY3MzMwOTMsMzcuNjY4NDg3NSwwLjY5MzkzOTIsNDUuODQ4MTE0LTEzLjY3NDAxMTJjMTIuODY2NjA3Ny01LjkzNzAxMTcsMjcuNDEwMDk1Mi0xOC4wMjY1NjU2LDM0LjY2MDMzOTQtMzEuMTMyMTEwNmMxMi43MTU2Njc3LTE4LjMxMjE5NDgsNDEuOTQyMzIxOC0zNy43MzA0NTM1LDQwLjg2OTIzMjItNTguMjg1NDE1NmMtNTcuODM4ODY3Miw1Ni4xMTY2MjI5LTE0Ni40OTc2NTAxLTYuNzg3Mjc3Mi0yMjguNzg3NzgwOCwzMS4yODQ3OWwtMjcuMTc1OTMzOC0xOC4wNzk2NTA5TDIyOC44NDIzNjE1LDIwNy40MDM4NTQ0eiIvPjwvc3ZnPg==',
|
|
183
|
+
category: 'transformation',
|
|
184
|
+
version: '1.2.0-alpha.2',
|
|
185
|
+
proxy: ['REQUEST', 'RESPONSE'],
|
|
186
|
+
message: ['MESSAGE_RESPONSE', 'MESSAGE_REQUEST'],
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: 'jwt',
|
|
190
|
+
name: 'JSON Web Tokens',
|
|
191
|
+
description: 'Description of the JWT Gravitee Policy',
|
|
192
|
+
icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAuNzEgMTEyLjgyIj48ZGVmcz48c3R5bGU+LmNscy0xe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DAsMCwxLS42MS0uMjVsLTkuMTQtOS4xM2EuODguODgsMCwwLDEsMC0xLjIyLjg2Ljg2LDAsMCwxLDEuMjIsMEw0Nyw1MS44QS44OC44OCwwLDAsMSw0Nyw1MywuODUuODUsMCwwLDEsNDYuMzYsNTMuMjdaIi8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMzcuMjIsNTMuMjdhLjg1Ljg1LDAsMCwxLS42MS0uMjUuODguODgsMCwwLDEsMC0xLjIybDkuMTQtOS4xM2EuODYuODYsMCwwLDEsMS4yMiwwLC44OC44OCwwLDAsMSwwLDEuMjJMMzcuODMsNTNBLjg1Ljg1LDAsMCwxLDM3LjIyLDUzLjI3WiIvPjwvZz48ZyBpZD0iSE9TVElORyI+PHRleHQgY2xhc3M9ImNscy0zIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNy45MyAtNC45OCkiPko8dHNwYW4gY2xhc3M9ImNscy00IiB4PSI0LjQ0IiB5PSIwIj5XPC90c3Bhbj48dHNwYW4geD0iMTQuOTkiIHk9IjAiPlQ8L3RzcGFuPjwvdGV4dD48L2c+PC9zdmc+',
|
|
193
|
+
category: 'security',
|
|
194
|
+
version: '3.2.0',
|
|
195
|
+
proxy: ['REQUEST'],
|
|
196
|
+
message: ['REQUEST'],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'key-less',
|
|
200
|
+
name: 'Keyless',
|
|
201
|
+
description: 'Description of the Keyless Security Gravitee Policy',
|
|
202
|
+
icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAuNzEgMTEyLjgyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6Izg2YzNkMDt9LmNscy0ye2ZpbGw6I2ZmZjt9LmNscy0ze2ZpbGw6bm9uZTtzdHJva2U6I2ZmZjtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2Utd2lkdGg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0',
|
|
205
|
+
proxy: ['REQUEST'],
|
|
206
|
+
message: ['REQUEST'],
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
id: 'api-key',
|
|
210
|
+
name: 'Api Key',
|
|
211
|
+
description: 'Description of the ApiKey Gravitee Policy',
|
|
212
|
+
icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAuNzEgMTEyLjgyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6Izg2YzNkMDt9LmNscy0ye2ZpbGw6I2ZmZjt9LmNscy0ze2ZvbnQtc2l6ZToxMnB4O2ZpbGw6IzFkMWQxYjtmb250LWZhbWlseTpNeXJpYWRQcm8tUmVndWxhciwgTXlyaWFkIFBybzt9LmNscy00e2xldHRlci1zcGFjaW5nOjBlbTt9PC9zdHlsZT48L2RlZnM+PGcgaWQ9IkFQSSI+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNNTAuMzUsMTMuMzdhNDMsNDMsMCwxLDAsNDMuMDUsNDNBNDMsNDMsMCwwLDAsNTAuMzUsMTMuMzdaIi8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNjcuMzMsNzguNjVIMzkuNzhBMi42MSwyLjYxLDAsMCwxLDM3LjE3LDc2VjcxLjg4YS44NC44NCwwLDAsMSwuMzYtLjcsNy4wNiw3LjA2LDAsMCwwLDItMi4yMS44NS44NSwwLDAsMSwuNzUtLjQzSDQyLjZMNDUsNjYuNzlhLjg2Ljg2LDAsMCwxLDEtLjA1bDIuNzIsMS42NCwyLjUzLTEuNjJhLjg2Ljg2LDAsMCwxLDEsMGwuNDkuMzhWNjIuNDZINDAuMjhhLjg2Ljg2LDAsMCwxLS43NS0uNDQsNi43Niw2Ljc2LDAsMCwwLTItMi4xOS44OC44OCwwLDAsMS0uMzYtLjcxVjU1YTIuNjIsMi42MiwwLDAsMSwyLjYxLTIuNjJINjcuMzNB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NTMuNTYsNzMuNjlhLjg3Ljg3LDAsMCwxLS44Ny0uODdWNjlhLjg3Ljg3LDAsMCwxLDEuNzQsMHYzLjg1QS44Ny44NywwLDAsMSw1My41Niw3My42OVoiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik01My41Niw2Mi4zN2EuODcuODcsMCwwLDEtLjg3LS44N1Y1Ny42NWEuODcuODcsMCwwLDEsMS43NCwwVjYxLjVBLjg3Ljg3LDAsMCwxLDUzLjU2LDYyLjM3WiIvPjwvZz48ZyBpZD0iSE9TVElORyI+PHRleHQgY2xhc3M9ImNscy0zIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNy45MyAtNC45OCkiPjx0c3BhbiBjbGFzcz0iY2xzLTQiPkE8L3RzcGFuPjx0c3BhbiB4PSI3LjMxIiB5PSIwIj5waSBLZXk8L3RzcGFuPjwvdGV4dD48L2c+PC9zdmc+',
|
|
213
|
+
category: 'security',
|
|
214
|
+
version: '3.2.1',
|
|
215
|
+
proxy: ['REQUEST'],
|
|
216
|
+
message: ['REQUEST'],
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: 'oauth2',
|
|
220
|
+
name: 'OAuth2',
|
|
221
|
+
description: 'Description of the OAuth2 Gravitee Policy',
|
|
222
|
+
icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAuNzEgMTEyLjgyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6Izg2YzNkMDt9LmNscy0ye2ZpbGw6I2ZmZjt9LmNscy0ze2ZvbnQtc2l6ZToxMnB4O2ZpbGw6IzFkMWQxYjtmb250LWZhbWlseTpNeXJpYWRQcm8tUmVndWxhciwgTXlyaWFkIFBybzt9LmNscy00e2xldHRlci1zcGFjaW5nOi0wLjAxZW07fS5jbHMtNXtsZXR0ZXItc3BhY2luZzowLjAxZW07fS5jbHMtNntsZXR0ZXIt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DgiIHk9IjAiPm9ubmU8L3RzcGFuPjx0c3BhbiBjbGFzcz0iY2xzLTUiIHg9IjczLjkyIiB5PSIwIj5jPC90c3Bhbj48dHNwYW4gY2xhc3M9ImNscy02IiB4PSI3OS40NSIgeT0iMCI+dCAtIDwvdHNwYW4+PHRzcGFuIGNsYXNzPSJjbHMtNyIgeD0iOTIuMTkiIHk9IjAiPlU8L3RzcGFuPjx0c3BhbiB4PSI5OS44OSIgeT0iMCI+c2VyPC90c3Bhbj48dHNwYW4gY2xhc3M9ImNscy04IiB4PSIxMTQuNTciIHk9IjAiPkk8L3RzcGFuPjx0c3BhbiB4PSIxMTcuNTYiIHk9IjAiPm48L3RzcGFuPjx0c3BhbiBjbGFzcz0iY2xzLTkiIHg9IjEyNC4yMiIgeT0iMCI+ZjwvdHNwYW4+PHRzcGFuIHg9IjEyNy41NyIgeT0iMCI+bzwvdHNwYW4+PC90ZXh0Pjx0ZXh0IGNsYXNzPSJjbHMtMyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTcuOTMgLTQuOTgpIj48dHNwYW4gY2xhc3M9ImNscy0xMCI+TzwvdHNwYW4+PHRzcGFuIGNsYXNzPSJjbHMtMTEiIHg9IjguMSIgeT0iMCI+QTwvdHNwYW4+PHRzcGFuIHg9IjE1LjMiIHk9IjAiPnV0aDI8L3RzcGFuPjwvdGV4dD48L2c+PC9zdmc+',
|
|
223
|
+
category: 'security',
|
|
224
|
+
version: '2.2.0',
|
|
225
|
+
proxy: ['REQUEST'],
|
|
226
|
+
message: ['REQUEST'],
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: 'json-to-json',
|
|
230
|
+
name: 'JSON to JSON Transformation',
|
|
231
|
+
description: 'Description of the JSON to JSON Transformation Gravitee Policy',
|
|
232
|
+
icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAuNzEgMTEyLjgyI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tNC45OCkiPkpTT04gPHRzcGFuIGNsYXNzPSJjbHMtNCIgeD0iMjkuMDYiIHk9IjAiPnQ8L3RzcGFuPjx0c3BhbiB4PSIzMi45NiIgeT0iMCI+byBKU09OPC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==',
|
|
233
|
+
category: 'transformation',
|
|
234
|
+
version: '2.1.0',
|
|
235
|
+
proxy: ['REQUEST', 'RESPONSE'],
|
|
236
|
+
message: ['MESSAGE_RESPONSE', 'MESSAGE_REQUEST'],
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: 'transform-headers',
|
|
240
|
+
name: 'Transform Headers',
|
|
241
|
+
description: 'Description of the Transform Headers Gravitee Policy',
|
|
242
|
+
icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAuNzEgMTEyLjgyIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6Izg2YzNkMDt9LmNscy0ye2ZpbGw6I2ZmZjt9LmNscy0ze2ZvbnQtc2l6ZToxMnB4O2ZpbGw6IzFkMWQxYjtmb250LWZhbWlseTpNeXJpYWRQcm8tUmVndWxhciwgTXlyaWFkIFBybzt9LmNscy00e2xldHRlci1zcGFjaW5nOi0wLjAxZW07fTwvc3R5bGU+PC9kZWZzPjxnIGlkPSJBUEkiPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTUwLjM1LDEzLjM3YTQzLDQzLDAsMSwwLDQzLjA1LDQzQTQzLDQzLDAsMCwwLDUwLjM1LDEzLjM3WiIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTYzLjgsNzcuMDlhNC44Myw0LjgzLDAsMSwxLDMuNjktNy45Miw0Ljc0LDQuNzQsMCwwLDEsMS4xMywzLjA5QTQuODMsNC44MywwLDAsMSw2My44LDc3LjA5Wm0wLTcuOTNhMy4xMSwzLjExLDAsMSwwLDIuMzgsMS4xMk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0xLjIxLjg1Ljg1LDAsMCwxLDEuMi0uMTZBMTguNTIsMTguNTIsMCwwLDAsNTEuNSw3Ny4wNywxOC4yMywxOC4yMywwLDAsMCw1NSw3Ni43M2EuODcuODcsMCwwLDEsLjMzLDEuN0EyMC44NywyMC44NywwLDAsMSw1MS41LDc4Ljc5WiIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTcwLDY1LjQyYS44NC44NCwwLDAsMS0uMjcsMCwuODYuODYsMCwwLDEtLjU0LTEuMDksMTguNzEsMTguNzEsMCwwLDAtOC41NS0yMi4xNy44Ni44NiwwLDEsMSwuODUtMS41LDIwLjQyLDIwLjQyLDAsMCwxLDkuMzMsMjQuMjFBLjg3Ljg3LDAsMCwxLDcwLDY1LjQyWiIvPjwvZz48ZyBpZD0iSE9TVElORyI+PHRleHQgY2xhc3M9ImNscy0zIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNy45MyAtNC45OCkiPkpTT04gPHRzcGFuIGNsYXNzPSJjbHMtNCIgeD0iMjkuMDYiIHk9IjAiPnQ8L3RzcGFuPjx0c3BhbiB4PSIzMi45NiIgeT0iMCI+byBKU09OPC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==',
|
|
243
|
+
category: 'transformation',
|
|
244
|
+
version: '2.1.0-alpha.2',
|
|
245
|
+
deployed: true,
|
|
246
|
+
proxy: ['REQUEST', 'RESPONSE'],
|
|
247
|
+
message: ['MESSAGE_RESPONSE', 'REQUEST', 'MESSAGE_REQUEST', 'RESPONSE'],
|
|
248
|
+
},
|
|
249
|
+
];
|
|
250
|
+
function fakeTestPolicy(modifier) {
|
|
251
|
+
const base = {
|
|
252
|
+
id: 'test-policy',
|
|
253
|
+
name: 'Policy to test UI',
|
|
254
|
+
icon: 'gio:gift',
|
|
255
|
+
proxy: ['REQUEST', 'RESPONSE'],
|
|
256
|
+
message: ['REQUEST', 'RESPONSE', 'MESSAGE_RESPONSE', 'MESSAGE_REQUEST'],
|
|
257
|
+
};
|
|
258
|
+
if (isFunction(modifier)) {
|
|
259
|
+
return modifier(base);
|
|
260
|
+
}
|
|
261
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
262
|
+
}
|
|
263
|
+
function fakeAllPolicies() {
|
|
264
|
+
return [
|
|
265
|
+
fakeTestPolicy(),
|
|
266
|
+
fakeTestPolicy({
|
|
267
|
+
id: 'test-policy-empty',
|
|
268
|
+
name: 'Test policy - Witout icon, configuration and documentation',
|
|
269
|
+
icon: undefined,
|
|
270
|
+
}),
|
|
271
|
+
fakeTestPolicy({
|
|
272
|
+
name: 'Test policy - With very long name to test overflow. Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
|
|
273
|
+
description: 'Test policy description - With very long name to test overflow. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla quis sem at nibh elementum imperdiet.',
|
|
274
|
+
}),
|
|
275
|
+
fakeTestPolicy({
|
|
276
|
+
name: 'No license policy',
|
|
277
|
+
deployed: false,
|
|
278
|
+
description: 'No license policy should display a lock icon and a clear CTA.',
|
|
279
|
+
}),
|
|
280
|
+
fakeTestPolicy({
|
|
281
|
+
id: 'transformation-policy',
|
|
282
|
+
name: 'transformation policy',
|
|
283
|
+
category: 'transformation',
|
|
284
|
+
proxy: ['REQUEST'],
|
|
285
|
+
}),
|
|
286
|
+
...POLICIES_V4_UNREGISTERED_ICON.map(policy => (Object.assign(Object.assign({}, policy), (policy.icon ? { icon: `gio-literal:${policy.id}` } : {})))),
|
|
287
|
+
];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/*
|
|
291
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
292
|
+
*
|
|
293
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
294
|
+
* you may not use this file except in compliance with the License.
|
|
295
|
+
* You may obtain a copy of the License at
|
|
296
|
+
*
|
|
297
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
298
|
+
*
|
|
299
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
300
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
301
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
302
|
+
* See the License for the specific language governing permissions and
|
|
303
|
+
* limitations under the License.
|
|
304
|
+
*/
|
|
305
|
+
function fakeTestPolicyStep(modifier) {
|
|
306
|
+
const base = {
|
|
307
|
+
name: fakeTestPolicy().name,
|
|
308
|
+
description: 'Test Policy description',
|
|
309
|
+
enabled: true,
|
|
310
|
+
policy: 'test-policy',
|
|
311
|
+
configuration: {
|
|
312
|
+
test: 'test',
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
if (isFunction(modifier)) {
|
|
316
|
+
return modifier(base);
|
|
317
|
+
}
|
|
318
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
319
|
+
}
|
|
320
|
+
function fakeRateLimitStep(modifier) {
|
|
321
|
+
const base = {
|
|
322
|
+
name: 'Rate Limit',
|
|
323
|
+
description: 'Step description',
|
|
324
|
+
enabled: true,
|
|
325
|
+
policy: 'rate-limit',
|
|
326
|
+
configuration: {
|
|
327
|
+
rate: {
|
|
328
|
+
limit: 10,
|
|
329
|
+
periodTime: 1,
|
|
330
|
+
periodTimeUnit: 'MINUTES',
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
};
|
|
334
|
+
if (isFunction(modifier)) {
|
|
335
|
+
return modifier(base);
|
|
336
|
+
}
|
|
337
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
338
|
+
}
|
|
339
|
+
function fakeJsonToXmlStep(modifier) {
|
|
340
|
+
const base = {
|
|
341
|
+
name: 'JSON to XML',
|
|
342
|
+
description: 'JSON to XML',
|
|
343
|
+
enabled: true,
|
|
344
|
+
policy: 'json-xml',
|
|
345
|
+
configuration: {},
|
|
346
|
+
};
|
|
347
|
+
if (isFunction(modifier)) {
|
|
348
|
+
return modifier(base);
|
|
349
|
+
}
|
|
350
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/*
|
|
354
|
+
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
355
|
+
*
|
|
356
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
357
|
+
* you may not use this file except in compliance with the License.
|
|
358
|
+
* You may obtain a copy of the License at
|
|
359
|
+
*
|
|
360
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
361
|
+
*
|
|
362
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
363
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
364
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
365
|
+
* See the License for the specific language governing permissions and
|
|
366
|
+
* limitations under the License.
|
|
367
|
+
*/
|
|
368
|
+
|
|
369
|
+
/*
|
|
370
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
371
|
+
*
|
|
372
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
373
|
+
* you may not use this file except in compliance with the License.
|
|
374
|
+
* You may obtain a copy of the License at
|
|
375
|
+
*
|
|
376
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
377
|
+
*
|
|
378
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
379
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
380
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
381
|
+
* See the License for the specific language governing permissions and
|
|
382
|
+
* limitations under the License.
|
|
383
|
+
*/
|
|
384
|
+
function fakePlan(modifier) {
|
|
385
|
+
const base = {
|
|
386
|
+
id: 'plan-id',
|
|
387
|
+
name: 'Keyless plan',
|
|
388
|
+
flows: [],
|
|
389
|
+
};
|
|
390
|
+
if (isFunction(modifier)) {
|
|
391
|
+
return modifier(base);
|
|
392
|
+
}
|
|
393
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/*
|
|
397
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
398
|
+
*
|
|
399
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
400
|
+
* you may not use this file except in compliance with the License.
|
|
401
|
+
* You may obtain a copy of the License at
|
|
402
|
+
*
|
|
403
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
404
|
+
*
|
|
405
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
406
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
407
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
408
|
+
* See the License for the specific language governing permissions and
|
|
409
|
+
* limitations under the License.
|
|
410
|
+
*/
|
|
411
|
+
|
|
412
|
+
/*
|
|
413
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
414
|
+
*
|
|
415
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
416
|
+
* you may not use this file except in compliance with the License.
|
|
417
|
+
* You may obtain a copy of the License at
|
|
418
|
+
*
|
|
419
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
420
|
+
*
|
|
421
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
422
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
423
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
424
|
+
* See the License for the specific language governing permissions and
|
|
425
|
+
* limitations under the License.
|
|
426
|
+
*/
|
|
427
|
+
|
|
428
|
+
/*
|
|
429
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
430
|
+
*
|
|
431
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
432
|
+
* you may not use this file except in compliance with the License.
|
|
433
|
+
* You may obtain a copy of the License at
|
|
434
|
+
*
|
|
435
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
436
|
+
*
|
|
437
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
438
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
439
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
440
|
+
* See the License for the specific language governing permissions and
|
|
441
|
+
* limitations under the License.
|
|
442
|
+
*/
|
|
443
|
+
function fakeSSEMessageEntrypoint(modifier) {
|
|
444
|
+
const base = {
|
|
445
|
+
type: 'sse',
|
|
446
|
+
name: 'Server-Sent Events',
|
|
447
|
+
supportedModes: ['SUBSCRIBE'],
|
|
448
|
+
icon: 'gio:puzzle',
|
|
449
|
+
};
|
|
450
|
+
if (isFunction(modifier)) {
|
|
451
|
+
return modifier(base);
|
|
452
|
+
}
|
|
453
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
454
|
+
}
|
|
455
|
+
function fakeWebsocketMessageEntrypoint(modifier) {
|
|
456
|
+
const base = {
|
|
457
|
+
type: 'websocket',
|
|
458
|
+
name: 'Websocket',
|
|
459
|
+
supportedModes: ['PUBLISH', 'SUBSCRIBE'],
|
|
460
|
+
icon: 'gio:websocket',
|
|
461
|
+
};
|
|
462
|
+
if (isFunction(modifier)) {
|
|
463
|
+
return modifier(base);
|
|
464
|
+
}
|
|
465
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
466
|
+
}
|
|
467
|
+
function fakeHTTPPostMessageEntrypoint(modifier) {
|
|
468
|
+
const base = {
|
|
469
|
+
type: 'http-post',
|
|
470
|
+
name: 'HTTP POST',
|
|
471
|
+
supportedModes: ['PUBLISH'],
|
|
472
|
+
icon: 'gio:language',
|
|
473
|
+
};
|
|
474
|
+
if (isFunction(modifier)) {
|
|
475
|
+
return modifier(base);
|
|
476
|
+
}
|
|
477
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
478
|
+
}
|
|
479
|
+
function fakeHTTPGetMessageEntrypoint(modifier) {
|
|
480
|
+
const base = {
|
|
481
|
+
type: 'http-get',
|
|
482
|
+
name: 'HTTP Get',
|
|
483
|
+
supportedModes: ['SUBSCRIBE'],
|
|
484
|
+
icon: 'gio:language',
|
|
485
|
+
};
|
|
486
|
+
if (isFunction(modifier)) {
|
|
487
|
+
return modifier(base);
|
|
488
|
+
}
|
|
489
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
490
|
+
}
|
|
491
|
+
function fakeWebhookMessageEntrypoint(modifier) {
|
|
492
|
+
const base = {
|
|
493
|
+
type: 'webhook',
|
|
494
|
+
name: 'Webhook',
|
|
495
|
+
supportedModes: ['SUBSCRIBE'],
|
|
496
|
+
icon: 'gio:webhook',
|
|
497
|
+
};
|
|
498
|
+
if (isFunction(modifier)) {
|
|
499
|
+
return modifier(base);
|
|
500
|
+
}
|
|
501
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
502
|
+
}
|
|
503
|
+
function fakeHTTPProxyEntrypoint(modifier) {
|
|
504
|
+
const base = {
|
|
505
|
+
type: 'http-proxy',
|
|
506
|
+
name: 'HTTP Proxy',
|
|
507
|
+
supportedModes: ['REQUEST_RESPONSE'],
|
|
508
|
+
icon: 'gio:language',
|
|
509
|
+
};
|
|
510
|
+
if (isFunction(modifier)) {
|
|
511
|
+
return modifier(base);
|
|
512
|
+
}
|
|
513
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
514
|
+
}
|
|
515
|
+
function fakeMockMessageEndpoint(modifier) {
|
|
516
|
+
const base = {
|
|
517
|
+
type: 'mock',
|
|
518
|
+
name: 'Mock',
|
|
519
|
+
supportedModes: ['PUBLISH', 'SUBSCRIBE'],
|
|
520
|
+
icon: 'gio:language',
|
|
521
|
+
};
|
|
522
|
+
if (isFunction(modifier)) {
|
|
523
|
+
return modifier(base);
|
|
524
|
+
}
|
|
525
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
526
|
+
}
|
|
527
|
+
function fakeKafkaMessageEndpoint(modifier) {
|
|
528
|
+
const base = {
|
|
529
|
+
type: 'kafka',
|
|
530
|
+
name: 'Kafka',
|
|
531
|
+
supportedModes: ['PUBLISH', 'SUBSCRIBE'],
|
|
532
|
+
icon: 'gio:kafka',
|
|
533
|
+
};
|
|
534
|
+
if (isFunction(modifier)) {
|
|
535
|
+
return modifier(base);
|
|
536
|
+
}
|
|
537
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
538
|
+
}
|
|
539
|
+
function fakeHTTPProxyEndpoint(modifier) {
|
|
540
|
+
const base = {
|
|
541
|
+
type: 'http-proxy',
|
|
542
|
+
name: 'HTTP Proxy',
|
|
543
|
+
supportedModes: ['REQUEST_RESPONSE'],
|
|
544
|
+
icon: 'gio:language',
|
|
545
|
+
};
|
|
546
|
+
if (isFunction(modifier)) {
|
|
547
|
+
return modifier(base);
|
|
548
|
+
}
|
|
549
|
+
return Object.assign(Object.assign({}, base), modifier);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/*
|
|
553
|
+
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
554
|
+
*
|
|
555
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
556
|
+
* you may not use this file except in compliance with the License.
|
|
557
|
+
* You may obtain a copy of the License at
|
|
558
|
+
*
|
|
559
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
560
|
+
*
|
|
561
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
562
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
563
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
564
|
+
* See the License for the specific language governing permissions and
|
|
565
|
+
* limitations under the License.
|
|
566
|
+
*/
|
|
567
|
+
|
|
568
|
+
class GioPolicyStudioFlowsMenuHarness extends ComponentHarness {
|
|
569
|
+
constructor() {
|
|
570
|
+
super(...arguments);
|
|
571
|
+
this.locateFlowsGroups = this.locatorForAll(DivHarness.with({ selector: '.list__flowsGroup' }));
|
|
572
|
+
this.locateFlowByText = (text) => this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup__flow', text }));
|
|
573
|
+
this.locateGroupByText = (text) => this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup', text }));
|
|
574
|
+
this.locateSelectedFlow = this.locatorForOptional(DivHarness.with({ selector: '.list__flowsGroup__flow.selected' }));
|
|
575
|
+
}
|
|
576
|
+
getAllFlowsGroups() {
|
|
577
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
578
|
+
const flowsGroups = yield this.locateFlowsGroups();
|
|
579
|
+
return parallel(() => flowsGroups.map((flowsGroup) => __awaiter(this, void 0, void 0, function* () {
|
|
580
|
+
const flowsGroupName = yield flowsGroup.getText({ childSelector: '.list__flowsGroup__header__label' });
|
|
581
|
+
const flowsDiv = yield flowsGroup.childLocatorForAll(DivHarness.with({ selector: '.list__flowsGroup__flow' }))();
|
|
582
|
+
const flowsInfos = parallel(() => flowsDiv.map((flowDiv) => __awaiter(this, void 0, void 0, function* () {
|
|
583
|
+
return {
|
|
584
|
+
name: yield flowDiv.getText({ childSelector: '.list__flowsGroup__flow__name' }),
|
|
585
|
+
infos: yield flowDiv.getText({ childSelector: '.list__flowsGroup__flow__infos' }),
|
|
586
|
+
isSelected: yield flowDiv.host().then(host => host.hasClass('selected')),
|
|
587
|
+
hasCondition: !!(yield flowDiv.childLocatorFor(MatIconHarness.with({ name: 'gio:if' }))),
|
|
588
|
+
};
|
|
589
|
+
})));
|
|
590
|
+
return {
|
|
591
|
+
name: flowsGroupName,
|
|
592
|
+
flows: yield flowsInfos,
|
|
593
|
+
};
|
|
594
|
+
})));
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
getSelectedFlow() {
|
|
598
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
599
|
+
const selectedFlow = yield this.locateSelectedFlow();
|
|
600
|
+
return selectedFlow ? { name: yield selectedFlow.getText({ childSelector: '.list__flowsGroup__flow__name' }) } : null;
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* Select a flow by it's text content
|
|
605
|
+
*/
|
|
606
|
+
selectFlow(flowText) {
|
|
607
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
608
|
+
const flowsGroups = yield this.locateFlowByText(flowText)();
|
|
609
|
+
if (flowsGroups) {
|
|
610
|
+
yield flowsGroups.host().then(host => host.click());
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
addFlow(groupName) {
|
|
615
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
616
|
+
const flowsGroups = yield this.locateGroupByText(groupName)();
|
|
617
|
+
if (flowsGroups) {
|
|
618
|
+
yield (yield flowsGroups.childLocatorFor(MatButtonHarness.with({ ancestor: '.list__flowsGroup__header__addBtn' }))()).click();
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
openFlowExecutionConfig() {
|
|
623
|
+
var _a;
|
|
624
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
625
|
+
yield ((_a = (yield this.locatorFor(MatButtonHarness.with({ selector: '.header__configBtn_edit' }))())) === null || _a === void 0 ? void 0 : _a.click());
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
GioPolicyStudioFlowsMenuHarness.hostSelector = 'gio-ps-flows-menu';
|
|
630
|
+
|
|
631
|
+
class GioPolicyStudioDetailsInfoBarHarness extends ComponentHarness {
|
|
632
|
+
getInfos() {
|
|
633
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
634
|
+
const infosDiv = yield this.locatorForAll(DivHarness.with({ selector: '.info' }))();
|
|
635
|
+
const allKeyValue = yield parallel(() => infosDiv.map((info) => __awaiter(this, void 0, void 0, function* () {
|
|
636
|
+
const label = yield info.childLocatorFor(SpanHarness.with({ selector: '.info__label' }))();
|
|
637
|
+
const value = yield info.childLocatorForAll(SpanHarness.with({ selector: '.info__value' }))();
|
|
638
|
+
return { label: yield label.getText(), value: yield parallel(() => value.map(v => v.getText())) };
|
|
639
|
+
})));
|
|
640
|
+
return allKeyValue.reduce((acc, curr) => {
|
|
641
|
+
if (curr.label) {
|
|
642
|
+
return Object.assign(Object.assign({}, acc), { [curr.label]: curr.value });
|
|
643
|
+
}
|
|
644
|
+
return acc;
|
|
645
|
+
}, {});
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
GioPolicyStudioDetailsInfoBarHarness.hostSelector = 'gio-ps-flow-details-info-bar';
|
|
650
|
+
|
|
651
|
+
class GioPolicyStudioDetailsHarness extends ComponentHarness {
|
|
652
|
+
isDisplayEmptyFlow() {
|
|
653
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
654
|
+
const hostText = yield (yield this.host()).text();
|
|
655
|
+
return hostText.includes('No flows yet');
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
getFlowInfos() {
|
|
659
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
660
|
+
return yield (yield this.locatorFor(GioPolicyStudioDetailsInfoBarHarness)()).getInfos();
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
matchText(matcher) {
|
|
664
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
665
|
+
const hostText = yield (yield this.host()).text();
|
|
666
|
+
return matcher.test(hostText);
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
clickEditFlowBtn() {
|
|
670
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
671
|
+
const editFlowBtn = yield this.locatorFor(MatButtonHarness.with({ selector: '.header__configBtn__edit' }))();
|
|
672
|
+
yield editFlowBtn.click();
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
clickDeleteFlowBtn() {
|
|
676
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
677
|
+
const deleteFlowBtn = yield this.locatorFor(MatButtonHarness.with({ selector: '.header__configBtn__delete' }))();
|
|
678
|
+
yield deleteFlowBtn.click();
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
GioPolicyStudioDetailsHarness.hostSelector = 'gio-ps-flow-details';
|
|
683
|
+
|
|
684
|
+
class GioPolicyStudioFlowProxyFormDialogHarness extends ComponentHarness {
|
|
685
|
+
constructor() {
|
|
686
|
+
super(...arguments);
|
|
687
|
+
this.getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));
|
|
688
|
+
this.getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));
|
|
689
|
+
this.nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }));
|
|
690
|
+
this.pathOperatorInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="pathOperator"]' }));
|
|
691
|
+
this.pathInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="path"]' }));
|
|
692
|
+
this.methodsInput = this.locatorFor(GioFormTagsInputHarness.with({ selector: '[formControlName="methods"]' }));
|
|
693
|
+
this.conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }));
|
|
694
|
+
}
|
|
695
|
+
setFlowFormValues(flow) {
|
|
696
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
697
|
+
if (flow.name) {
|
|
698
|
+
const nameInput = yield this.nameInput();
|
|
699
|
+
yield nameInput.setValue(flow.name);
|
|
700
|
+
}
|
|
701
|
+
if (flow.pathOperator) {
|
|
702
|
+
const pathOperatorInput = yield this.pathOperatorInput();
|
|
703
|
+
yield pathOperatorInput.open();
|
|
704
|
+
// Unselect all options before selecting the new one
|
|
705
|
+
for (const option of yield pathOperatorInput.getOptions()) {
|
|
706
|
+
if (yield option.isSelected()) {
|
|
707
|
+
yield option.click();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
yield pathOperatorInput.clickOptions({ text: new RegExp(flow.pathOperator, 'i') });
|
|
711
|
+
}
|
|
712
|
+
if (flow.path) {
|
|
713
|
+
const input = yield this.pathInput();
|
|
714
|
+
yield input.setValue(flow.path);
|
|
715
|
+
}
|
|
716
|
+
if (flow.methods) {
|
|
717
|
+
const methodsInput = yield this.methodsInput();
|
|
718
|
+
yield methodsInput.removeTag('ALL');
|
|
719
|
+
for (const method of flow.methods) {
|
|
720
|
+
yield methodsInput.addTag(method);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
if (flow.condition) {
|
|
724
|
+
const conditionInput = yield this.conditionInput();
|
|
725
|
+
yield conditionInput.setValue(flow.condition);
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
getFlowFormValues() {
|
|
730
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
731
|
+
return {
|
|
732
|
+
name: yield this.getFlowName(),
|
|
733
|
+
pathOperator: yield this.getPathOperator(),
|
|
734
|
+
path: yield this.getFlowPath(),
|
|
735
|
+
methods: yield this.getMethods(),
|
|
736
|
+
condition: yield this.getCondition(),
|
|
737
|
+
};
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
getFlowName() {
|
|
741
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
742
|
+
return this.nameInput().then(input => input.getValue());
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
getFlowPath() {
|
|
746
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
747
|
+
return this.pathInput().then(input => input.getValue());
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
getPathOperator() {
|
|
751
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
752
|
+
return this.pathOperatorInput().then(input => input.getValueText());
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
getMethods() {
|
|
756
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
757
|
+
return this.methodsInput().then(input => input.getTags());
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
getCondition() {
|
|
761
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
762
|
+
return this.conditionInput().then(input => input.getValue());
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
save() {
|
|
766
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
767
|
+
const button = yield this.getSaveBtn();
|
|
768
|
+
yield button.click();
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
cancel() {
|
|
772
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
773
|
+
const button = yield this.getCancelBtn();
|
|
774
|
+
yield button.click();
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
GioPolicyStudioFlowProxyFormDialogHarness.hostSelector = 'gio-ps-flow-proxy-form-dialog';
|
|
779
|
+
|
|
780
|
+
class GioPolicyStudioFlowMessageFormDialogHarness extends ComponentHarness {
|
|
781
|
+
constructor() {
|
|
782
|
+
super(...arguments);
|
|
783
|
+
this.getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));
|
|
784
|
+
this.getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));
|
|
785
|
+
this.nameInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="name"]' }));
|
|
786
|
+
this.channelOperatorInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="channelOperator"]' }));
|
|
787
|
+
this.channelInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="channel"]' }));
|
|
788
|
+
this.operationsInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="operations"]' }));
|
|
789
|
+
this.entrypointsInput = this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="entrypoints"]' }));
|
|
790
|
+
this.conditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }));
|
|
791
|
+
}
|
|
792
|
+
setFlowFormValues(flow) {
|
|
793
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
794
|
+
if (flow.name) {
|
|
795
|
+
const nameInput = yield this.nameInput();
|
|
796
|
+
yield nameInput.setValue(flow.name);
|
|
797
|
+
}
|
|
798
|
+
if (flow.channelOperator) {
|
|
799
|
+
const channelOperatorInput = yield this.channelOperatorInput();
|
|
800
|
+
const entrypointsInput = yield this.entrypointsInput();
|
|
801
|
+
yield channelOperatorInput.open();
|
|
802
|
+
// Unselect all options before selecting the new one
|
|
803
|
+
for (const option of yield entrypointsInput.getOptions()) {
|
|
804
|
+
if (yield option.isSelected()) {
|
|
805
|
+
yield option.click();
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
yield channelOperatorInput.clickOptions({ text: new RegExp(flow.channelOperator, 'i') });
|
|
809
|
+
}
|
|
810
|
+
if (flow.channel) {
|
|
811
|
+
const channelInput = yield this.channelInput();
|
|
812
|
+
yield channelInput.setValue(flow.channel);
|
|
813
|
+
}
|
|
814
|
+
if (flow.operations) {
|
|
815
|
+
const operationsInput = yield this.operationsInput();
|
|
816
|
+
yield parallel(() => {
|
|
817
|
+
var _a;
|
|
818
|
+
return ((_a = flow.operations) !== null && _a !== void 0 ? _a : []).map((operation) => __awaiter(this, void 0, void 0, function* () {
|
|
819
|
+
yield operationsInput.open();
|
|
820
|
+
// Unselect all options before selecting the new one
|
|
821
|
+
for (const option of yield operationsInput.getOptions()) {
|
|
822
|
+
if (yield option.isSelected()) {
|
|
823
|
+
yield option.click();
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
yield operationsInput.clickOptions({ text: new RegExp(operation, 'i') });
|
|
827
|
+
}));
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
if (flow.entrypoints) {
|
|
831
|
+
const entrypointsInput = yield this.entrypointsInput();
|
|
832
|
+
yield entrypointsInput.open();
|
|
833
|
+
// Unselect all options before selecting the new one
|
|
834
|
+
for (const option of yield entrypointsInput.getOptions()) {
|
|
835
|
+
if (yield option.isSelected()) {
|
|
836
|
+
yield option.click();
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
yield parallel(() => {
|
|
840
|
+
var _a;
|
|
841
|
+
return ((_a = flow.entrypoints) !== null && _a !== void 0 ? _a : []).map((entrypoint) => __awaiter(this, void 0, void 0, function* () {
|
|
842
|
+
yield entrypointsInput.clickOptions({ text: new RegExp(entrypoint, 'i') });
|
|
843
|
+
}));
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
if (flow.condition) {
|
|
847
|
+
const conditionInput = yield this.conditionInput();
|
|
848
|
+
yield conditionInput.setValue(flow.condition);
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
getName() {
|
|
853
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
854
|
+
return this.nameInput().then(input => input.getValue());
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
getChannelOperator() {
|
|
858
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
859
|
+
return this.channelOperatorInput().then(input => input.getValueText());
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
getChannel() {
|
|
863
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
864
|
+
return this.channelInput().then(input => input.getValue());
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
getOperations() {
|
|
868
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
869
|
+
return this.operationsInput().then(input => input.getValueText());
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
getEntrypoints() {
|
|
873
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
874
|
+
return this.entrypointsInput().then(input => input.getValueText());
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
getCondition() {
|
|
878
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
879
|
+
return this.conditionInput().then(input => input.getValue());
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
save() {
|
|
883
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
884
|
+
const button = yield this.getSaveBtn();
|
|
885
|
+
yield button.click();
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
cancel() {
|
|
889
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
890
|
+
const button = yield this.getCancelBtn();
|
|
891
|
+
yield button.click();
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
getFormValues() {
|
|
895
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
896
|
+
const name = yield this.getName();
|
|
897
|
+
const channelOperator = yield this.getChannelOperator();
|
|
898
|
+
const channel = yield this.getChannel();
|
|
899
|
+
const entrypoints = (yield this.getEntrypoints()).split(',');
|
|
900
|
+
const operations = (yield this.getOperations()).split(',');
|
|
901
|
+
const condition = yield this.getCondition();
|
|
902
|
+
return {
|
|
903
|
+
name,
|
|
904
|
+
channel,
|
|
905
|
+
channelOperator,
|
|
906
|
+
entrypoints,
|
|
907
|
+
operations,
|
|
908
|
+
condition,
|
|
909
|
+
};
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
GioPolicyStudioFlowMessageFormDialogHarness.hostSelector = 'gio-ps-flow-message-form-dialog';
|
|
914
|
+
|
|
915
|
+
class GioPolicyStudioFlowExecutionFormDialogHarness extends ComponentHarness {
|
|
916
|
+
constructor() {
|
|
917
|
+
super(...arguments);
|
|
918
|
+
this.getSaveBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__saveBtn' }));
|
|
919
|
+
this.getCancelBtn = this.locatorFor(MatButtonHarness.with({ selector: '.actions__cancelBtn' }));
|
|
920
|
+
}
|
|
921
|
+
setFlowFormValues(flowExecution) {
|
|
922
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
923
|
+
const modeInput = yield this.locatorFor(MatSelectHarness.with({ selector: '[formControlName="mode"]' }))();
|
|
924
|
+
const matchRequiredInput = yield this.locatorFor(MatSlideToggleHarness.with({ selector: '[formControlName="matchRequired"]' }))();
|
|
925
|
+
if (flowExecution.mode) {
|
|
926
|
+
yield modeInput.open();
|
|
927
|
+
// Unselect all options before selecting the new one
|
|
928
|
+
for (const option of yield modeInput.getOptions()) {
|
|
929
|
+
if (yield option.isSelected()) {
|
|
930
|
+
yield option.click();
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
const flowModeToValue = {
|
|
934
|
+
BEST_MATCH: 'Best match',
|
|
935
|
+
DEFAULT: 'Default',
|
|
936
|
+
};
|
|
937
|
+
yield modeInput.clickOptions({ text: new RegExp(flowModeToValue[flowExecution.mode], 'i') });
|
|
938
|
+
}
|
|
939
|
+
if (flowExecution.matchRequired) {
|
|
940
|
+
yield matchRequiredInput.check();
|
|
941
|
+
}
|
|
942
|
+
else {
|
|
943
|
+
yield matchRequiredInput.uncheck();
|
|
944
|
+
}
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
save() {
|
|
948
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
949
|
+
const button = yield this.getSaveBtn();
|
|
950
|
+
yield button.click();
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
cancel() {
|
|
954
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
955
|
+
const button = yield this.getCancelBtn();
|
|
956
|
+
yield button.click();
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
GioPolicyStudioFlowExecutionFormDialogHarness.hostSelector = 'gio-ps-flow-execution-form-dialog';
|
|
961
|
+
|
|
962
|
+
class GioPolicyStudioDetailsPhaseStepHarness extends ComponentHarness {
|
|
963
|
+
/**
|
|
964
|
+
* Get Harness with the given filter.
|
|
965
|
+
*
|
|
966
|
+
* @param options Options for filtering which input instances are considered a match.
|
|
967
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
968
|
+
*/
|
|
969
|
+
static with(options = {}) {
|
|
970
|
+
return new HarnessPredicate(GioPolicyStudioDetailsPhaseStepHarness, options);
|
|
971
|
+
}
|
|
972
|
+
getName() {
|
|
973
|
+
var _a;
|
|
974
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
975
|
+
return (_a = (yield (yield this.locatorFor(SpanHarness.with({ selector: '.info__head__name' }))()).getText())) !== null && _a !== void 0 ? _a : '';
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
getDescription() {
|
|
979
|
+
var _a, _b;
|
|
980
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
981
|
+
return (_b = (yield ((_a = (yield this.locatorForOptional(DivHarness.with({ selector: '.info__description' }))())) === null || _a === void 0 ? void 0 : _a.getText()))) !== null && _b !== void 0 ? _b : undefined;
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
clickOnEdit() {
|
|
985
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
986
|
+
const matMenu = yield this.locatorFor(MatMenuHarness)();
|
|
987
|
+
yield matMenu.clickItem({ text: 'Edit' });
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
clickOnDelete() {
|
|
991
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
992
|
+
const matMenu = yield this.locatorFor(MatMenuHarness)();
|
|
993
|
+
yield matMenu.clickItem({ text: 'Delete' });
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
clickOnDisableEnable() {
|
|
997
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
998
|
+
const matMenu = yield this.locatorFor(MatMenuHarness)();
|
|
999
|
+
yield matMenu.clickItem({ text: /Disable|Enable/ });
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
GioPolicyStudioDetailsPhaseStepHarness.hostSelector = 'gio-ps-flow-details-phase-step';
|
|
1004
|
+
|
|
1005
|
+
class GioPolicyStudioStepFormHarness extends ComponentHarness {
|
|
1006
|
+
constructor() {
|
|
1007
|
+
super(...arguments);
|
|
1008
|
+
this.getDescriptionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="description"]' }));
|
|
1009
|
+
this.getConditionInput = this.locatorFor(MatInputHarness.with({ selector: '[formControlName="condition"]' }));
|
|
1010
|
+
}
|
|
1011
|
+
setStepForm(stepForm) {
|
|
1012
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1013
|
+
if (stepForm.description) {
|
|
1014
|
+
const descriptionInput = yield this.getDescriptionInput();
|
|
1015
|
+
yield descriptionInput.setValue(stepForm.description);
|
|
1016
|
+
}
|
|
1017
|
+
if (stepForm.condition) {
|
|
1018
|
+
const conditionInput = yield this.getConditionInput();
|
|
1019
|
+
yield conditionInput.setValue(stepForm.condition);
|
|
1020
|
+
}
|
|
1021
|
+
if (stepForm.waitForPolicyFormCompletionCb) {
|
|
1022
|
+
yield stepForm.waitForPolicyFormCompletionCb(this.locatorFactory);
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
getStepFormValue() {
|
|
1027
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1028
|
+
const descriptionInput = yield this.getDescriptionInput();
|
|
1029
|
+
return {
|
|
1030
|
+
description: yield descriptionInput.getValue(),
|
|
1031
|
+
};
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
getDocumentation() {
|
|
1035
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1036
|
+
const documentation = yield this.locatorFor('.documentation__content > gio-asciidoctor')();
|
|
1037
|
+
return documentation.getAttribute('ng-reflect-content');
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
GioPolicyStudioStepFormHarness.hostSelector = 'gio-ps-step-form';
|
|
1042
|
+
|
|
1043
|
+
class GioPolicyStudioStepEditDialogHarness extends ComponentHarness {
|
|
1044
|
+
getPolicyName() {
|
|
1045
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1046
|
+
return (yield this.locatorFor('.title__name')()).text();
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
getStepForm() {
|
|
1050
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1051
|
+
return yield this.locatorFor(GioPolicyStudioStepFormHarness)();
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
save() {
|
|
1055
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1056
|
+
return (yield this.locatorFor('.actions__saveBtn')()).click();
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
GioPolicyStudioStepEditDialogHarness.hostSelector = 'gio-ps-step-edit-dialog';
|
|
1061
|
+
|
|
1062
|
+
class GioPolicyStudioPoliciesCatalogDialogHarness extends ComponentHarness {
|
|
1063
|
+
constructor() {
|
|
1064
|
+
super(...arguments);
|
|
1065
|
+
this.policiesLocator = this.locatorForAll(DivHarness.with({ selector: '.policiesCatalog__list__policy' }));
|
|
1066
|
+
this.getCategoriesFilter = this.locatorForOptional(MatChipListboxHarness.with({ selector: '[formControlName="categories"]' }));
|
|
1067
|
+
}
|
|
1068
|
+
getPhase() {
|
|
1069
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1070
|
+
const phase = yield this.locatorFor('.title__phase')();
|
|
1071
|
+
return phase.text();
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
getPoliciesName() {
|
|
1075
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1076
|
+
const policies = yield this.locatorForAll('.policiesCatalog__list__policy__head__name')();
|
|
1077
|
+
return parallel(() => policies.map(policy => policy.text()));
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
selectPolicy(policyName) {
|
|
1081
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1082
|
+
const policies = yield this.policiesLocator();
|
|
1083
|
+
for (const policy of policies) {
|
|
1084
|
+
const name = yield policy.getText({ childSelector: '.policiesCatalog__list__policy__head__name' });
|
|
1085
|
+
if (name === policyName) {
|
|
1086
|
+
const selectBtn = yield policy.childLocatorFor(MatButtonHarness.with({ selector: '.policiesCatalog__list__policy__selectBtn' }))();
|
|
1087
|
+
yield selectBtn.click();
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
throw new Error(`Policy ${policyName} not found`);
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
getSelectedPolicyName() {
|
|
1095
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1096
|
+
const policy = yield this.locatorFor('.policyForm__info__head__name')();
|
|
1097
|
+
return policy.text();
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
hasRequestUpgradeButton() {
|
|
1101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1102
|
+
const requestUpgradeButton = yield this.locatorForOptional(MatButtonHarness.with({ text: 'Request upgrade' }))();
|
|
1103
|
+
return !!requestUpgradeButton;
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
clickAddPolicyButton() {
|
|
1107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1108
|
+
const addBtn = yield this.locatorFor(MatButtonHarness.with({ selector: '.actions__addBtn' }))();
|
|
1109
|
+
yield addBtn.click();
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
getStepForm() {
|
|
1113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1114
|
+
return yield this.locatorFor(GioPolicyStudioStepFormHarness)();
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
getCategoriesSelection() {
|
|
1118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1119
|
+
const chipList = yield this.getCategoriesFilter();
|
|
1120
|
+
if (!chipList) {
|
|
1121
|
+
return [];
|
|
1122
|
+
}
|
|
1123
|
+
const chips = yield chipList.getChips();
|
|
1124
|
+
return parallel(() => chips.map((chip) => __awaiter(this, void 0, void 0, function* () {
|
|
1125
|
+
const selected = yield chip.isSelected();
|
|
1126
|
+
const name = yield chip.getText();
|
|
1127
|
+
return { name, selected };
|
|
1128
|
+
})));
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
selectCategoryFilter(categoryName) {
|
|
1132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1133
|
+
const chipList = yield this.getCategoriesFilter();
|
|
1134
|
+
yield (chipList === null || chipList === void 0 ? void 0 : chipList.selectChips({ text: categoryName }));
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
searchFilter(search) {
|
|
1138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1139
|
+
const searchInput = yield this.locatorFor(MatInputHarness.with({ selector: '[formControlName="search"]' }))();
|
|
1140
|
+
if (searchInput) {
|
|
1141
|
+
yield searchInput.setValue(search);
|
|
1142
|
+
}
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
GioPolicyStudioPoliciesCatalogDialogHarness.hostSelector = 'gio-ps-policies-catalog-dialog';
|
|
1147
|
+
|
|
1148
|
+
const TYPE_TO_TEXT = {
|
|
1149
|
+
REQUEST: 'Request phase',
|
|
1150
|
+
RESPONSE: 'Response phase',
|
|
1151
|
+
PUBLISH: 'Publish phase',
|
|
1152
|
+
SUBSCRIBE: 'Subscribe phase',
|
|
1153
|
+
};
|
|
1154
|
+
class GioPolicyStudioDetailsPhaseHarness extends ComponentHarness {
|
|
1155
|
+
constructor() {
|
|
1156
|
+
super(...arguments);
|
|
1157
|
+
this.getHeaderName = () => this.locatorForOptional(SpanHarness.with({ selector: '.header__name' }))().then((span) => __awaiter(this, void 0, void 0, function* () { var _a; return (_a = span === null || span === void 0 ? void 0 : span.getText()) !== null && _a !== void 0 ? _a : null; }));
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Get Harness with the given filter.
|
|
1161
|
+
*
|
|
1162
|
+
* @param options Options for filtering which input instances are considered a match.
|
|
1163
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
1164
|
+
*/
|
|
1165
|
+
static with(options = {}) {
|
|
1166
|
+
return new HarnessPredicate(GioPolicyStudioDetailsPhaseHarness, options).addOption('type', options.type, (harness, type) => __awaiter(this, void 0, void 0, function* () { return HarnessPredicate.stringMatches(harness.getHeaderName(), TYPE_TO_TEXT[type]); }));
|
|
1167
|
+
}
|
|
1168
|
+
getSteps() {
|
|
1169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1170
|
+
if (yield this.locatorForOptional('.disabledContent')()) {
|
|
1171
|
+
return 'DISABLED';
|
|
1172
|
+
}
|
|
1173
|
+
const stepsDiv = yield this.locatorForAll(DivHarness.with({ selector: '.content__step' }))();
|
|
1174
|
+
if (isEmpty(stepsDiv)) {
|
|
1175
|
+
// No step - the phase is disabled
|
|
1176
|
+
return [];
|
|
1177
|
+
}
|
|
1178
|
+
return yield parallel(() => stepsDiv.map((stepDiv) => __awaiter(this, void 0, void 0, function* () {
|
|
1179
|
+
var _a;
|
|
1180
|
+
const idConnector = !!(yield stepDiv.getText({ childSelector: '.content__step__connector__badge' }));
|
|
1181
|
+
if (idConnector) {
|
|
1182
|
+
return {
|
|
1183
|
+
name: (_a = (yield stepDiv.getText())) !== null && _a !== void 0 ? _a : '',
|
|
1184
|
+
type: 'connector',
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
const step = yield stepDiv.childLocatorFor(GioPolicyStudioDetailsPhaseStepHarness)();
|
|
1188
|
+
const conditionDiv = yield stepDiv.childLocatorForOptional(DivHarness.with({ selector: '.content__step__policy__condition' }))();
|
|
1189
|
+
const description = yield step.getDescription();
|
|
1190
|
+
return Object.assign({ type: 'step', name: yield step.getName(), hasCondition: !!conditionDiv }, (description ? { description } : {}));
|
|
1191
|
+
})));
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
getStep(index) {
|
|
1195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1196
|
+
const steps = yield this.locatorForAll(GioPolicyStudioDetailsPhaseStepHarness)();
|
|
1197
|
+
if (!steps[index]) {
|
|
1198
|
+
throw new Error(`Step ${index} not found`);
|
|
1199
|
+
}
|
|
1200
|
+
return steps[index];
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
clickAddStep(index) {
|
|
1204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1205
|
+
const addStepBtn = yield this.locatorForAll(DivHarness.with({ selector: '.content__step' }))().then(divs => divs[index]);
|
|
1206
|
+
yield addStepBtn
|
|
1207
|
+
.childLocatorFor(MatButtonHarness.with({ selector: '.content__step__addBtn' }))()
|
|
1208
|
+
.then(btn => btn.click());
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* Add a step to a phase
|
|
1213
|
+
* @param index Index where to add the step. (Add button index)
|
|
1214
|
+
* @param stepConfig Step to add
|
|
1215
|
+
*/
|
|
1216
|
+
addStep(index, stepConfig) {
|
|
1217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1218
|
+
yield this.clickAddStep(index);
|
|
1219
|
+
const catalogDialog = yield this.documentRootLocatorFactory().locatorFor(GioPolicyStudioPoliciesCatalogDialogHarness)();
|
|
1220
|
+
yield catalogDialog.selectPolicy(stepConfig.policyName);
|
|
1221
|
+
yield (yield catalogDialog.getStepForm()).setStepForm(stepConfig);
|
|
1222
|
+
yield catalogDialog.clickAddPolicyButton();
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
/**
|
|
1226
|
+
* Edit a step configuration
|
|
1227
|
+
* @param index Index of the policy step to edit
|
|
1228
|
+
* @param stepConfig Step configuration
|
|
1229
|
+
*/
|
|
1230
|
+
editStep(index, stepConfig) {
|
|
1231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1232
|
+
const step = yield this.getStep(index);
|
|
1233
|
+
yield step.clickOnEdit();
|
|
1234
|
+
const stepEditDialog = yield this.documentRootLocatorFactory().locatorFor(GioPolicyStudioStepEditDialogHarness)();
|
|
1235
|
+
yield (yield stepEditDialog.getStepForm()).setStepForm(stepConfig);
|
|
1236
|
+
yield stepEditDialog.save();
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
/**
|
|
1240
|
+
* Delete a step
|
|
1241
|
+
* @param index Index of the policy step to delete
|
|
1242
|
+
*/
|
|
1243
|
+
deleteStep(index) {
|
|
1244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1245
|
+
const step = yield this.getStep(index);
|
|
1246
|
+
yield step.clickOnDelete();
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* Disable a step
|
|
1251
|
+
* @param index Index of the policy step to disable
|
|
1252
|
+
*/
|
|
1253
|
+
disableEnableStep(index) {
|
|
1254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1255
|
+
const step = yield this.getStep(index);
|
|
1256
|
+
yield step.clickOnDisableEnable();
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
GioPolicyStudioDetailsPhaseHarness.hostSelector = 'gio-ps-flow-details-phase';
|
|
1261
|
+
|
|
1262
|
+
class GioPolicyStudioHarness extends ComponentHarness {
|
|
1263
|
+
constructor() {
|
|
1264
|
+
super(...arguments);
|
|
1265
|
+
this.menuHarness = this.locatorFor(GioPolicyStudioFlowsMenuHarness);
|
|
1266
|
+
this.detailsHarness = this.locatorFor(GioPolicyStudioDetailsHarness);
|
|
1267
|
+
this.phaseHarness = (phaseType) => this.locatorFor(GioPolicyStudioDetailsPhaseHarness.with({ type: phaseType }))();
|
|
1268
|
+
}
|
|
1269
|
+
/**
|
|
1270
|
+
* Add a flow to a plan or to "Common flows"
|
|
1271
|
+
*
|
|
1272
|
+
* @param groupName Plan name where to add the flow. You also can define "Common flows" to add a flow to this group.
|
|
1273
|
+
* @param flow Flow to add
|
|
1274
|
+
*/
|
|
1275
|
+
addFlow(groupName, flow) {
|
|
1276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1277
|
+
yield (yield this.menuHarness()).addFlow(new RegExp(groupName, 'i'));
|
|
1278
|
+
yield this.setFlowFormDialog(flow);
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* Edit a flow configuration
|
|
1283
|
+
*
|
|
1284
|
+
* @param flowName Flow name to edit
|
|
1285
|
+
* @param flow
|
|
1286
|
+
*/
|
|
1287
|
+
editFlowConfig(flowName, flow) {
|
|
1288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1289
|
+
(yield this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));
|
|
1290
|
+
yield (yield this.detailsHarness()).clickEditFlowBtn();
|
|
1291
|
+
yield this.setFlowFormDialog(flow);
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Delete a flow
|
|
1296
|
+
*
|
|
1297
|
+
* @param flowName Flow name to delete
|
|
1298
|
+
*/
|
|
1299
|
+
deleteFlow(flowName) {
|
|
1300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1301
|
+
(yield this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));
|
|
1302
|
+
yield (yield this.detailsHarness()).clickDeleteFlowBtn();
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Select a flow in the menu
|
|
1307
|
+
*
|
|
1308
|
+
* @param flowName Flow name to select
|
|
1309
|
+
*/
|
|
1310
|
+
selectFlowInMenu(flowName) {
|
|
1311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1312
|
+
yield (yield this.menuHarness()).selectFlow(new RegExp(flowName, 'i'));
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Get the list of flows in the menu
|
|
1317
|
+
*/
|
|
1318
|
+
getFlowsMenu() {
|
|
1319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1320
|
+
return (yield this.menuHarness()).getAllFlowsGroups();
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* Get selected flow infos
|
|
1325
|
+
*/
|
|
1326
|
+
getSelectedFlowInfos() {
|
|
1327
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1328
|
+
return yield (yield this.detailsHarness()).getFlowInfos();
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Get selected flow phase harness
|
|
1333
|
+
* @param phaseType Phase type to get
|
|
1334
|
+
*/
|
|
1335
|
+
getSelectedFlowPhase(phaseType) {
|
|
1336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1337
|
+
if (phaseType === 'PUBLISH' || phaseType === 'SUBSCRIBE') {
|
|
1338
|
+
const matTabsHarness = yield this.locatorFor(MatTabGroupHarness.with({ selector: '.content__tabs' }))();
|
|
1339
|
+
yield matTabsHarness.selectTab({ label: 'Event messages' });
|
|
1340
|
+
}
|
|
1341
|
+
const steps = yield this.phaseHarness(phaseType);
|
|
1342
|
+
return steps ? steps : undefined;
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
/**
|
|
1346
|
+
* Get Save button state
|
|
1347
|
+
*/
|
|
1348
|
+
getSaveButtonState() {
|
|
1349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1350
|
+
const saveButton = yield this.locatorFor(MatButtonHarness.with({ ancestor: '.header__btn' }))();
|
|
1351
|
+
const disabled = yield saveButton.isDisabled();
|
|
1352
|
+
const text = yield saveButton.getText();
|
|
1353
|
+
if (text === 'Saving...') {
|
|
1354
|
+
return 'SAVING';
|
|
1355
|
+
}
|
|
1356
|
+
if (disabled) {
|
|
1357
|
+
return 'DISABLED';
|
|
1358
|
+
}
|
|
1359
|
+
return 'VISIBLE';
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
/**
|
|
1363
|
+
* Click on the "Save" button
|
|
1364
|
+
*/
|
|
1365
|
+
save() {
|
|
1366
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1367
|
+
yield (yield this.locatorFor(MatButtonHarness.with({ text: /Save/ }))()).click();
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
setFlowFormDialog(flow) {
|
|
1371
|
+
var _a, _b, _c;
|
|
1372
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1373
|
+
const channelSelector = (_a = flow.selectors) === null || _a === void 0 ? void 0 : _a.find(s => s.type === 'CHANNEL');
|
|
1374
|
+
const httpSelector = (_b = flow.selectors) === null || _b === void 0 ? void 0 : _b.find(s => s.type === 'HTTP');
|
|
1375
|
+
const conditionSelector = (_c = flow.selectors) === null || _c === void 0 ? void 0 : _c.find(s => s.type === 'CONDITION');
|
|
1376
|
+
if (!!channelSelector && !!httpSelector) {
|
|
1377
|
+
throw new Error('Channel and HTTP selectors are not be used together.');
|
|
1378
|
+
}
|
|
1379
|
+
if (channelSelector) {
|
|
1380
|
+
const flowFormNewDialog = yield this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowMessageFormDialogHarness)();
|
|
1381
|
+
const toChannelOperator = {
|
|
1382
|
+
STARTS_WITH: 'Starts with',
|
|
1383
|
+
EQUALS: 'Equals',
|
|
1384
|
+
};
|
|
1385
|
+
yield flowFormNewDialog.setFlowFormValues({
|
|
1386
|
+
name: flow.name,
|
|
1387
|
+
channel: channelSelector === null || channelSelector === void 0 ? void 0 : channelSelector.channel,
|
|
1388
|
+
channelOperator: toChannelOperator[channelSelector.channelOperator],
|
|
1389
|
+
entrypoints: channelSelector === null || channelSelector === void 0 ? void 0 : channelSelector.entrypoints,
|
|
1390
|
+
operations: channelSelector === null || channelSelector === void 0 ? void 0 : channelSelector.operations,
|
|
1391
|
+
condition: conditionSelector === null || conditionSelector === void 0 ? void 0 : conditionSelector.condition,
|
|
1392
|
+
});
|
|
1393
|
+
yield flowFormNewDialog.save();
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
if (httpSelector) {
|
|
1397
|
+
const flowFormNewDialog = yield this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowProxyFormDialogHarness)();
|
|
1398
|
+
yield flowFormNewDialog.setFlowFormValues({
|
|
1399
|
+
name: flow.name,
|
|
1400
|
+
path: httpSelector === null || httpSelector === void 0 ? void 0 : httpSelector.path,
|
|
1401
|
+
pathOperator: httpSelector === null || httpSelector === void 0 ? void 0 : httpSelector.pathOperator,
|
|
1402
|
+
methods: httpSelector === null || httpSelector === void 0 ? void 0 : httpSelector.methods,
|
|
1403
|
+
condition: conditionSelector === null || conditionSelector === void 0 ? void 0 : conditionSelector.condition,
|
|
1404
|
+
});
|
|
1405
|
+
yield flowFormNewDialog.save();
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
throw new Error('No selector found for this flow. Needed to select Message or Proxy flow form dialog.');
|
|
1409
|
+
});
|
|
1410
|
+
}
|
|
1411
|
+
setFlowExecutionConfig(flowExecution) {
|
|
1412
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1413
|
+
yield (yield this.menuHarness()).openFlowExecutionConfig();
|
|
1414
|
+
const flowExecutionDialog = yield this.documentRootLocatorFactory().locatorFor(GioPolicyStudioFlowExecutionFormDialogHarness)();
|
|
1415
|
+
yield flowExecutionDialog.setFlowFormValues(flowExecution);
|
|
1416
|
+
yield flowExecutionDialog.save();
|
|
1417
|
+
});
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
GioPolicyStudioHarness.hostSelector = 'gio-policy-studio';
|
|
1421
|
+
|
|
1422
|
+
/*
|
|
1423
|
+
* Copyright (C) 2022 The Gravitee team (http://gravitee.io)
|
|
1424
|
+
*
|
|
1425
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1426
|
+
* you may not use this file except in compliance with the License.
|
|
1427
|
+
* You may obtain a copy of the License at
|
|
1428
|
+
*
|
|
1429
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1430
|
+
*
|
|
1431
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1432
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1433
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1434
|
+
* See the License for the specific language governing permissions and
|
|
1435
|
+
* limitations under the License.
|
|
1436
|
+
*/
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* Generated bundle index. Do not edit.
|
|
1440
|
+
*/
|
|
1441
|
+
|
|
1442
|
+
export { GioPolicyStudioHarness, POLICIES_V4_UNREGISTERED_ICON, fakeAllPolicies, fakeBestMatchFlowExecution, fakeChannelFlow, fakeConditionedChannelFlow, fakeConditionedHttpFlow, fakeDefaultFlowExecution, fakeHTTPGetMessageEntrypoint, fakeHTTPPostMessageEntrypoint, fakeHTTPProxyEndpoint, fakeHTTPProxyEntrypoint, fakeHttpFlow, fakeJsonToXmlStep, fakeKafkaMessageEndpoint, fakeMockMessageEndpoint, fakePlan, fakeRateLimitStep, fakeSSEMessageEntrypoint, fakeTestPolicy, fakeTestPolicyStep, fakeWebhookMessageEntrypoint, fakeWebsocketMessageEntrypoint };
|
|
1443
|
+
//# sourceMappingURL=gravitee-ui-policy-studio-angular-testing.mjs.map
|