@kong-ui-public/entities-plugins 9.222.3 → 9.222.4
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/dist/filler/cypress/index.js +91 -90
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/filler/cypress/handlers/array.d.ts.map +1 -1
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/filler/cypress/handlers/enum.d.ts.map +1 -1
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/filler/playwright/handlers/array.d.ts.map +1 -1
- package/dist/filler/packages/entities/entities-plugins/src/components/free-form/filler/playwright/handlers/enum.d.ts.map +1 -1
- package/dist/filler/playwright/index.js +117 -116
- package/package.json +8 -8
|
@@ -1,71 +1,72 @@
|
|
|
1
|
-
import { s as f, i as w, c as S, g as b, w as A, a as
|
|
1
|
+
import { s as f, i as w, c as S, g as b, w as A, a as v, b as F, d as I } from "../field-walker-_YAwDcC1.js";
|
|
2
2
|
const m = {
|
|
3
3
|
type: { force: !0 },
|
|
4
4
|
click: { force: !0 },
|
|
5
5
|
check: { force: !0 },
|
|
6
6
|
clear: { force: !0 }
|
|
7
7
|
};
|
|
8
|
-
function
|
|
9
|
-
const { fieldKey: n, value: e, actionOptions: t = m } = r,
|
|
10
|
-
cy.get(
|
|
8
|
+
function B(r) {
|
|
9
|
+
const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.field(n);
|
|
10
|
+
cy.get(l).then((i) => {
|
|
11
11
|
t.clear !== !1 && cy.wrap(i).clear(t.clear), e != null && e !== "" && cy.wrap(i).type(String(e), t.type);
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
function C(r) {
|
|
15
|
-
const { fieldKey: n, value: e, actionOptions: t = m } = r,
|
|
16
|
-
cy.get(
|
|
15
|
+
const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.field(n);
|
|
16
|
+
cy.get(l).then((i) => {
|
|
17
17
|
t.clear !== !1 && cy.wrap(i).clear(t.clear), e != null && cy.wrap(i).type(String(e), t.type);
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function E(r) {
|
|
21
|
-
const { fieldKey: n, value: e, actionOptions: t = m } = r,
|
|
22
|
-
e === !0 ? cy.get(
|
|
21
|
+
const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.field(n);
|
|
22
|
+
e === !0 ? cy.get(l).check(t.check) : e === !1 && cy.get(l).uncheck(t.check);
|
|
23
23
|
}
|
|
24
24
|
function j(r) {
|
|
25
|
-
var
|
|
26
|
-
const { fieldKey: n, fieldSchema: e, value: t, actionOptions:
|
|
27
|
-
cy.get(d).scrollIntoView(), cy.get(d).click(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
i
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
var h;
|
|
26
|
+
const { fieldKey: n, fieldSchema: e, value: t, actionOptions: l = m } = r, i = w(e), y = i ? Array.isArray(t) ? t : [t] : [t], d = f.field(n);
|
|
27
|
+
cy.get(d).scrollIntoView(), cy.get(d).click(l.click);
|
|
28
|
+
const g = f.selectTrigger(n);
|
|
29
|
+
for (const a of e.one_of ?? ((h = e.elements) == null ? void 0 : h.one_of) ?? [])
|
|
30
|
+
if (a != null) {
|
|
31
|
+
const c = i ? f.multiSelectItem(String(a)) : f.selectItem(String(a));
|
|
32
|
+
i && cy.get(g).find(c).within((o) => {
|
|
33
|
+
o.find("button.selected").length > 0 && cy.get("button").click();
|
|
34
|
+
}), y.includes(a) && cy.get(g).find(c).click();
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
function x(r) {
|
|
37
|
-
const { fieldKey: n, value: e, actionOptions: t = m } = r,
|
|
38
|
-
cy.get(i).type(
|
|
38
|
+
const { fieldKey: n, value: e, actionOptions: t = m } = r, l = Array.isArray(e) ? e : [e], i = f.tagInput(n);
|
|
39
|
+
cy.get(i).type(l.join(","), t.type);
|
|
39
40
|
}
|
|
40
41
|
function M(r) {
|
|
41
|
-
const { fieldKey: n, value: e, onFillItem: t } = r,
|
|
42
|
+
const { fieldKey: n, value: e, onFillItem: t } = r, l = f.arrayTabContainer(n), i = f.arrayBasicContainer(n);
|
|
42
43
|
cy.get("body").then((y) => {
|
|
43
|
-
const d = y.find(
|
|
44
|
+
const d = y.find(l).length > 0, g = y.find(i).length > 0;
|
|
44
45
|
if (d || g) {
|
|
45
|
-
const
|
|
46
|
+
const h = f.arrayRemoveBtns(n), a = () => {
|
|
46
47
|
cy.get("body").then((c) => {
|
|
47
|
-
const
|
|
48
|
-
|
|
48
|
+
const o = c.find(h).first();
|
|
49
|
+
o.length > 0 && (cy.wrap(o).click(), a());
|
|
49
50
|
});
|
|
50
51
|
};
|
|
51
|
-
if (
|
|
52
|
+
if (a(), !Array.isArray(e))
|
|
52
53
|
return;
|
|
53
54
|
for (let c = 0; c < e.length; c++) {
|
|
54
|
-
const
|
|
55
|
-
cy.get(
|
|
55
|
+
const o = f.arrayAddBtn(n);
|
|
56
|
+
cy.get(o).scrollIntoView(), cy.get(o).click({ force: !0 }), t(c, e[c]);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
function T(r) {
|
|
61
|
-
const { fieldKey: n, value: e, onFillChildren: t } = r,
|
|
62
|
+
const { fieldKey: n, value: e, onFillChildren: t } = r, l = f.objectSwitch(n);
|
|
62
63
|
cy.get("body").then((i) => {
|
|
63
|
-
const y = i.find(
|
|
64
|
+
const y = i.find(l).length > 0;
|
|
64
65
|
if (e == null && y) {
|
|
65
|
-
cy.get(
|
|
66
|
+
cy.get(l).uncheck({ force: !0 });
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
|
-
y && cy.get(
|
|
69
|
+
y && cy.get(l).check({ force: !0 }), t();
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
function R(r, n) {
|
|
@@ -77,9 +78,9 @@ function R(r, n) {
|
|
|
77
78
|
return e[0];
|
|
78
79
|
}
|
|
79
80
|
function N(r) {
|
|
80
|
-
const { fieldKey: n, value: e, onFillEntry: t } = r,
|
|
81
|
+
const { fieldKey: n, value: e, onFillEntry: t } = r, l = f.mapRemoveBtns(n), i = () => {
|
|
81
82
|
cy.get("body").then((d) => {
|
|
82
|
-
const g = d.find(
|
|
83
|
+
const g = d.find(l).first();
|
|
83
84
|
g.length > 0 && (cy.wrap(g).click(), i());
|
|
84
85
|
});
|
|
85
86
|
};
|
|
@@ -88,27 +89,27 @@ function N(r) {
|
|
|
88
89
|
const y = Object.entries(e);
|
|
89
90
|
if (y.length !== 0)
|
|
90
91
|
for (let d = 0; d < y.length; d++) {
|
|
91
|
-
const [g,
|
|
92
|
-
cy.get(f.mapAddBtn(n)).click(), cy.get(f.mapKey(n, d)).clear({ force: !0 }), cy.get(f.mapKey(n, d)).type(String(g), { force: !0 }), cy.get(f.mapContainer(n, d)).find(`[data-testid*="${n}.kid:"]`).first().invoke("attr", "data-testid").then((
|
|
93
|
-
const c = R(
|
|
94
|
-
t(c,
|
|
92
|
+
const [g, h] = y[d];
|
|
93
|
+
cy.get(f.mapAddBtn(n)).click(), cy.get(f.mapKey(n, d)).clear({ force: !0 }), cy.get(f.mapKey(n, d)).type(String(g), { force: !0 }), cy.get(f.mapContainer(n, d)).find(`[data-testid*="${n}.kid:"]`).first().invoke("attr", "data-testid").then((a) => {
|
|
94
|
+
const c = R(a, n);
|
|
95
|
+
t(c, h);
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
function O(r) {
|
|
99
|
-
const { fieldKey: n, value: e, actionOptions: t = m } = r,
|
|
100
|
-
cy.get(
|
|
100
|
+
const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.json(n), i = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
101
|
+
cy.get(l).then((y) => {
|
|
101
102
|
t.clear !== !1 && cy.wrap(y.find("textarea")).clear(t.clear), cy.wrap(y.find("textarea")).type(i, t.type);
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
function J(r) {
|
|
105
|
-
const { fieldKey: n, value: e, actionOptions: t = m } = r,
|
|
106
|
-
cy.get(
|
|
106
|
+
const { fieldKey: n, value: e, actionOptions: t = m } = r, l = f.field(n);
|
|
107
|
+
cy.get(l).click(t.click);
|
|
107
108
|
const i = typeof e == "object" && (e != null && e.id) ? e.id : e;
|
|
108
109
|
i && cy.get(`[data-testid="select-item-${i}"]`).click(t.click);
|
|
109
110
|
}
|
|
110
111
|
const K = {
|
|
111
|
-
fillString:
|
|
112
|
+
fillString: B,
|
|
112
113
|
fillNumber: C,
|
|
113
114
|
fillBoolean: E,
|
|
114
115
|
fillEnum: j,
|
|
@@ -119,108 +120,108 @@ const K = {
|
|
|
119
120
|
fillJson: O,
|
|
120
121
|
fillForeign: J
|
|
121
122
|
};
|
|
122
|
-
function
|
|
123
|
+
function $(r, n) {
|
|
123
124
|
const e = S(r), t = { ...K, ...n };
|
|
124
|
-
function
|
|
125
|
-
for (const
|
|
126
|
-
i(
|
|
125
|
+
function l(a, c, o = "") {
|
|
126
|
+
for (const s of A(a, c, e, o))
|
|
127
|
+
i(s);
|
|
127
128
|
}
|
|
128
|
-
function i({ handlerType:
|
|
129
|
-
switch (
|
|
129
|
+
function i({ handlerType: a, fieldKey: c, fieldSchema: o, value: s }, u) {
|
|
130
|
+
switch (a) {
|
|
130
131
|
case "string":
|
|
131
|
-
t.fillString({ fieldKey: c, fieldSchema:
|
|
132
|
+
t.fillString({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
|
|
132
133
|
break;
|
|
133
134
|
case "number":
|
|
134
|
-
t.fillNumber({ fieldKey: c, fieldSchema:
|
|
135
|
+
t.fillNumber({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
|
|
135
136
|
break;
|
|
136
137
|
case "boolean":
|
|
137
|
-
t.fillBoolean({ fieldKey: c, fieldSchema:
|
|
138
|
+
t.fillBoolean({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
|
|
138
139
|
break;
|
|
139
140
|
case "enum":
|
|
140
|
-
t.fillEnum({ fieldKey: c, fieldSchema:
|
|
141
|
+
t.fillEnum({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
|
|
141
142
|
break;
|
|
142
143
|
case "tag":
|
|
143
|
-
t.fillTag({ fieldKey: c, fieldSchema:
|
|
144
|
+
t.fillTag({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
|
|
144
145
|
break;
|
|
145
146
|
case "map":
|
|
146
147
|
t.fillMap({
|
|
147
148
|
fieldKey: c,
|
|
148
|
-
fieldSchema:
|
|
149
|
-
value:
|
|
150
|
-
onFillEntry: (
|
|
151
|
-
d(e, c,
|
|
149
|
+
fieldSchema: o,
|
|
150
|
+
value: s,
|
|
151
|
+
onFillEntry: (p, k) => {
|
|
152
|
+
d(e, c, p, k);
|
|
152
153
|
}
|
|
153
154
|
});
|
|
154
155
|
break;
|
|
155
156
|
case "json":
|
|
156
|
-
t.fillJson({ fieldKey: c, fieldSchema:
|
|
157
|
+
t.fillJson({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
|
|
157
158
|
break;
|
|
158
159
|
case "foreign":
|
|
159
|
-
t.fillForeign({ fieldKey: c, fieldSchema:
|
|
160
|
+
t.fillForeign({ fieldKey: c, fieldSchema: o, value: s, actionOptions: u });
|
|
160
161
|
break;
|
|
161
162
|
case "array":
|
|
162
163
|
t.fillArray({
|
|
163
164
|
fieldKey: c,
|
|
164
|
-
fieldSchema:
|
|
165
|
-
value:
|
|
166
|
-
onFillItem: (
|
|
167
|
-
y(e, c,
|
|
165
|
+
fieldSchema: o,
|
|
166
|
+
value: s,
|
|
167
|
+
onFillItem: (p, k) => {
|
|
168
|
+
y(e, c, p, k);
|
|
168
169
|
}
|
|
169
170
|
});
|
|
170
171
|
break;
|
|
171
172
|
case "record":
|
|
172
173
|
t.fillRecord({
|
|
173
174
|
fieldKey: c,
|
|
174
|
-
fieldSchema:
|
|
175
|
-
value:
|
|
175
|
+
fieldSchema: o,
|
|
176
|
+
value: s,
|
|
176
177
|
onFillChildren: () => {
|
|
177
|
-
o
|
|
178
|
+
l(o.fields, s, c);
|
|
178
179
|
}
|
|
179
180
|
});
|
|
180
181
|
break;
|
|
181
182
|
}
|
|
182
183
|
}
|
|
183
|
-
function y(
|
|
184
|
-
const { itemKey: u, itemSchema:
|
|
185
|
-
|
|
186
|
-
handlerType: b(
|
|
184
|
+
function y(a, c, o, s) {
|
|
185
|
+
const { itemKey: u, itemSchema: p } = v(c, o, a);
|
|
186
|
+
F(p) ? l(p.fields, s, u) : i({
|
|
187
|
+
handlerType: b(p),
|
|
187
188
|
fieldKey: u,
|
|
188
|
-
fieldSchema:
|
|
189
|
-
value:
|
|
189
|
+
fieldSchema: p,
|
|
190
|
+
value: s
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
|
-
function d(
|
|
193
|
-
const { entryKey: u, entrySchema:
|
|
193
|
+
function d(a, c, o, s) {
|
|
194
|
+
const { entryKey: u, entrySchema: p } = I(c, o, a);
|
|
194
195
|
i({
|
|
195
|
-
handlerType: b(
|
|
196
|
+
handlerType: b(p),
|
|
196
197
|
fieldKey: u,
|
|
197
|
-
fieldSchema:
|
|
198
|
-
value:
|
|
198
|
+
fieldSchema: p,
|
|
199
|
+
value: s
|
|
199
200
|
});
|
|
200
201
|
}
|
|
201
|
-
function g(
|
|
202
|
-
r.fields && Array.isArray(r.fields) &&
|
|
202
|
+
function g(a) {
|
|
203
|
+
r.fields && Array.isArray(r.fields) && l(r.fields, a);
|
|
203
204
|
}
|
|
204
|
-
function
|
|
205
|
-
const
|
|
206
|
-
if (!
|
|
207
|
-
throw new Error(`Field schema for "${
|
|
205
|
+
function h(a, c, o) {
|
|
206
|
+
const s = e.schemaMap[a];
|
|
207
|
+
if (!s)
|
|
208
|
+
throw new Error(`Field schema for "${a}" not found in schema map`);
|
|
208
209
|
i({
|
|
209
|
-
handlerType: b(
|
|
210
|
-
fieldKey:
|
|
211
|
-
fieldSchema:
|
|
210
|
+
handlerType: b(s),
|
|
211
|
+
fieldKey: a,
|
|
212
|
+
fieldSchema: s,
|
|
212
213
|
value: c
|
|
213
|
-
},
|
|
214
|
+
}, o);
|
|
214
215
|
}
|
|
215
216
|
return {
|
|
216
217
|
fill: g,
|
|
217
|
-
fillField:
|
|
218
|
+
fillField: h,
|
|
218
219
|
schemaMap: e.schemaMap,
|
|
219
220
|
handlers: t
|
|
220
221
|
};
|
|
221
222
|
}
|
|
222
223
|
export {
|
|
223
|
-
|
|
224
|
+
$ as createFiller,
|
|
224
225
|
m as defaultActionOptions,
|
|
225
226
|
M as fillArray,
|
|
226
227
|
E as fillBoolean,
|
|
@@ -230,7 +231,7 @@ export {
|
|
|
230
231
|
N as fillMap,
|
|
231
232
|
C as fillNumber,
|
|
232
233
|
T as fillRecord,
|
|
233
|
-
|
|
234
|
+
B as fillString,
|
|
234
235
|
x as fillTag,
|
|
235
236
|
K as handlers
|
|
236
237
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/cypress/handlers/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,wBAAgB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/cypress/handlers/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,wBAAgB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CA2C1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/cypress/handlers/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5C,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,GAAG,cAAc,CAAC,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/cypress/handlers/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5C,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,GAAG,cAAc,CAAC,GAAG,IAAI,CAoChH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,wBAAsB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,wBAAsB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAI5C,wBAAsB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,GAAG,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/components/free-form/filler/playwright/handlers/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AACxH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAI5C,wBAAsB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,GAAG,qBAAqB,GAAG,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC/H"}
|
|
@@ -1,218 +1,219 @@
|
|
|
1
|
-
import { s as f, i as S, c as F, g as h, w as v, a as A, b as
|
|
2
|
-
async function
|
|
3
|
-
const { page: a, fieldKey: n, value: t } =
|
|
1
|
+
import { s as f, i as S, c as F, g as h, w as v, a as A, b as p, d as B } from "../field-walker-_YAwDcC1.js";
|
|
2
|
+
async function I(o) {
|
|
3
|
+
const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
|
|
4
4
|
await i.clear(), t != null && t !== "" && await i.fill(String(t));
|
|
5
5
|
}
|
|
6
|
-
async function
|
|
7
|
-
const { page: a, fieldKey: n, value: t } =
|
|
6
|
+
async function C(o) {
|
|
7
|
+
const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
|
|
8
8
|
await i.clear(), t != null && await i.fill(String(t));
|
|
9
9
|
}
|
|
10
|
-
async function
|
|
11
|
-
const { page: a, fieldKey: n, value: t } =
|
|
10
|
+
async function E(o) {
|
|
11
|
+
const { page: a, fieldKey: n, value: t } = o, e = f.field(n), i = a.locator(e);
|
|
12
12
|
t === !0 ? await i.check({ force: !0 }) : t === !1 && await i.uncheck({ force: !0 });
|
|
13
13
|
}
|
|
14
|
-
async function
|
|
15
|
-
var
|
|
16
|
-
const { page: a, fieldKey: n, fieldSchema: t, value:
|
|
17
|
-
await a.locator(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
async function T(o) {
|
|
15
|
+
var k;
|
|
16
|
+
const { page: a, fieldKey: n, fieldSchema: t, value: e } = o, i = S(t), w = i ? Array.isArray(e) ? e : [e] : [e], d = f.field(n);
|
|
17
|
+
await a.locator(d).click();
|
|
18
|
+
const g = f.selectTrigger(n);
|
|
19
|
+
for (const u of t.one_of ?? ((k = t.elements) == null ? void 0 : k.one_of) ?? [])
|
|
20
|
+
if (u != null) {
|
|
21
|
+
const r = i ? f.multiSelectItem(String(u)) : f.selectItem(String(u));
|
|
22
|
+
i && await a.locator(g).locator(`${r} button.selected`).count() > 0 && await a.locator(g).locator(r).click(), w.includes(u) && await a.locator(g).locator(r).click();
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
async function
|
|
25
|
-
const { page: a, fieldKey: n, value: t } =
|
|
26
|
-
await a.locator(i).fill(
|
|
25
|
+
async function j(o) {
|
|
26
|
+
const { page: a, fieldKey: n, value: t } = o, e = Array.isArray(t) ? t : [t], i = f.tagInput(n);
|
|
27
|
+
await a.locator(i).fill(e.join(","));
|
|
27
28
|
}
|
|
28
|
-
async function
|
|
29
|
-
const { page: a, fieldKey: n, value: t, onFillItem:
|
|
30
|
-
if (
|
|
31
|
-
const
|
|
32
|
-
await a.locator(
|
|
29
|
+
async function M(o) {
|
|
30
|
+
const { page: a, fieldKey: n, value: t, onFillItem: e } = o, i = f.arrayTabContainer(n), w = f.arrayBasicContainer(n), d = await a.locator(i).count() > 0, g = await a.locator(w).count() > 0;
|
|
31
|
+
if (d || g) {
|
|
32
|
+
const k = f.arrayRemoveBtns(n), u = async () => {
|
|
33
|
+
await a.locator(k).count() > 0 && (await a.locator(k).first().click(), await u());
|
|
33
34
|
};
|
|
34
|
-
if (await
|
|
35
|
+
if (await u(), !Array.isArray(t))
|
|
35
36
|
return;
|
|
36
|
-
for (let
|
|
37
|
+
for (let r = 0; r < t.length; r++) {
|
|
37
38
|
const c = f.arrayAddBtn(n);
|
|
38
|
-
await a.locator(c).click(), await
|
|
39
|
+
await a.locator(c).scrollIntoViewIfNeeded(), await a.locator(c).click({ force: !0 }), await e(r, t[r]);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
async function x(
|
|
43
|
-
const { page: a, fieldKey: n, onFillChildren: t } =
|
|
44
|
-
if ((
|
|
45
|
-
await a.locator(
|
|
43
|
+
async function x(o) {
|
|
44
|
+
const { page: a, fieldKey: n, onFillChildren: t } = o, e = f.objectSwitch(n), i = await a.locator(e).count() > 0;
|
|
45
|
+
if ((o.value === null || o.value === void 0) && i) {
|
|
46
|
+
await a.locator(e).locator("..").locator('[data-testid="switch-control"]').click({ force: !0 });
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
48
|
-
i && await a.locator(
|
|
49
|
+
i && await a.locator(e).locator("..").locator('[data-testid="switch-control"]').click({ force: !0 }), await new Promise((w) => setTimeout(w, 300)), await t();
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
-
if (!
|
|
51
|
+
function N(o, a) {
|
|
52
|
+
if (!o)
|
|
52
53
|
throw new Error(`Unable to find map entry test id for "${a}"`);
|
|
53
|
-
const n =
|
|
54
|
+
const n = o.match(/kid:\d+/);
|
|
54
55
|
if (!n)
|
|
55
|
-
throw new Error(`Unable to extract map entry kid id from test id "${
|
|
56
|
+
throw new Error(`Unable to extract map entry kid id from test id "${o}"`);
|
|
56
57
|
return n[0];
|
|
57
58
|
}
|
|
58
|
-
async function
|
|
59
|
-
const { page: a, fieldKey: n, value: t, onFillEntry:
|
|
60
|
-
const
|
|
61
|
-
await a.locator(
|
|
59
|
+
async function R(o) {
|
|
60
|
+
const { page: a, fieldKey: n, value: t, onFillEntry: e } = o, i = async () => {
|
|
61
|
+
const d = f.mapRemoveBtns(n);
|
|
62
|
+
await a.locator(d).count() !== 0 && (await a.locator(d).first().click(), await i());
|
|
62
63
|
};
|
|
63
64
|
if (await i(), typeof t != "object" || t == null)
|
|
64
65
|
return;
|
|
65
66
|
const w = Object.entries(t);
|
|
66
67
|
if (w.length !== 0)
|
|
67
|
-
for (let
|
|
68
|
-
const [
|
|
68
|
+
for (let d = 0; d < w.length; d++) {
|
|
69
|
+
const [g, k] = w[d];
|
|
69
70
|
await a.locator(f.mapAddBtn(n)).click();
|
|
70
|
-
const
|
|
71
|
-
await
|
|
72
|
-
const c = a.locator(f.mapKey(n,
|
|
73
|
-
await c.clear(), await c.fill(String(
|
|
74
|
-
const s =
|
|
71
|
+
const u = f.mapContainer(n, d), r = a.locator(u);
|
|
72
|
+
await r.waitFor();
|
|
73
|
+
const c = a.locator(f.mapKey(n, d));
|
|
74
|
+
await c.clear(), await c.fill(String(g));
|
|
75
|
+
const s = r.locator(`[data-testid*="${n}.kid:"]`).first();
|
|
75
76
|
await s.waitFor();
|
|
76
|
-
const
|
|
77
|
-
await
|
|
77
|
+
const l = N(await s.getAttribute("data-testid"), n);
|
|
78
|
+
await e(l, k);
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
async function
|
|
81
|
-
const { page: a, fieldKey: n, value: t } =
|
|
81
|
+
async function $(o) {
|
|
82
|
+
const { page: a, fieldKey: n, value: t } = o, e = f.json(n), i = a.locator(e).locator("textarea"), w = typeof t == "string" ? t : JSON.stringify(t, null, 2);
|
|
82
83
|
await i.clear(), await i.fill(w);
|
|
83
84
|
}
|
|
84
|
-
async function J(
|
|
85
|
-
const { page: a, fieldKey: n, value: t } =
|
|
86
|
-
await a.locator(
|
|
85
|
+
async function J(o) {
|
|
86
|
+
const { page: a, fieldKey: n, value: t } = o, e = f.field(n);
|
|
87
|
+
await a.locator(e).click();
|
|
87
88
|
const i = typeof t == "object" && (t != null && t.id) ? t.id : t;
|
|
88
89
|
i && await a.locator(`[data-testid="select-item-${i}"]`).click();
|
|
89
90
|
}
|
|
90
91
|
const H = {
|
|
91
|
-
fillString:
|
|
92
|
-
fillNumber:
|
|
93
|
-
fillBoolean:
|
|
94
|
-
fillEnum:
|
|
95
|
-
fillTag:
|
|
96
|
-
fillArray:
|
|
92
|
+
fillString: I,
|
|
93
|
+
fillNumber: C,
|
|
94
|
+
fillBoolean: E,
|
|
95
|
+
fillEnum: T,
|
|
96
|
+
fillTag: j,
|
|
97
|
+
fillArray: M,
|
|
97
98
|
fillRecord: x,
|
|
98
|
-
fillMap:
|
|
99
|
-
fillJson:
|
|
99
|
+
fillMap: R,
|
|
100
|
+
fillJson: $,
|
|
100
101
|
fillForeign: J
|
|
101
102
|
};
|
|
102
|
-
function U(
|
|
103
|
-
const t = F(a),
|
|
104
|
-
async function i(
|
|
105
|
-
for (const
|
|
106
|
-
await w(
|
|
103
|
+
function U(o, a, n) {
|
|
104
|
+
const t = F(a), e = { ...H, ...n };
|
|
105
|
+
async function i(r, c, s = "") {
|
|
106
|
+
for (const l of v(r, c, t, s))
|
|
107
|
+
await w(l);
|
|
107
108
|
}
|
|
108
|
-
async function w({ handlerType:
|
|
109
|
-
switch (
|
|
109
|
+
async function w({ handlerType: r, fieldKey: c, fieldSchema: s, value: l }, y) {
|
|
110
|
+
switch (r) {
|
|
110
111
|
case "string":
|
|
111
|
-
await
|
|
112
|
+
await e.fillString({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
|
|
112
113
|
break;
|
|
113
114
|
case "number":
|
|
114
|
-
await
|
|
115
|
+
await e.fillNumber({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
|
|
115
116
|
break;
|
|
116
117
|
case "boolean":
|
|
117
|
-
await
|
|
118
|
+
await e.fillBoolean({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
|
|
118
119
|
break;
|
|
119
120
|
case "enum":
|
|
120
|
-
await
|
|
121
|
+
await e.fillEnum({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
|
|
121
122
|
break;
|
|
122
123
|
case "tag":
|
|
123
|
-
await
|
|
124
|
+
await e.fillTag({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
|
|
124
125
|
break;
|
|
125
126
|
case "map":
|
|
126
|
-
await
|
|
127
|
-
page:
|
|
127
|
+
await e.fillMap({
|
|
128
|
+
page: o,
|
|
128
129
|
fieldKey: c,
|
|
129
130
|
fieldSchema: s,
|
|
130
|
-
value:
|
|
131
|
-
onFillEntry: async (m,
|
|
132
|
-
await
|
|
131
|
+
value: l,
|
|
132
|
+
onFillEntry: async (m, b) => {
|
|
133
|
+
await g(t, c, m, b);
|
|
133
134
|
}
|
|
134
135
|
});
|
|
135
136
|
break;
|
|
136
137
|
case "json":
|
|
137
|
-
await
|
|
138
|
+
await e.fillJson({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
|
|
138
139
|
break;
|
|
139
140
|
case "foreign":
|
|
140
|
-
await
|
|
141
|
+
await e.fillForeign({ page: o, fieldKey: c, fieldSchema: s, value: l, typeOptions: y });
|
|
141
142
|
break;
|
|
142
143
|
case "array":
|
|
143
|
-
await
|
|
144
|
-
page:
|
|
144
|
+
await e.fillArray({
|
|
145
|
+
page: o,
|
|
145
146
|
fieldKey: c,
|
|
146
147
|
fieldSchema: s,
|
|
147
|
-
value:
|
|
148
|
-
onFillItem: async (m,
|
|
149
|
-
await
|
|
148
|
+
value: l,
|
|
149
|
+
onFillItem: async (m, b) => {
|
|
150
|
+
await d(t, c, m, b);
|
|
150
151
|
}
|
|
151
152
|
});
|
|
152
153
|
break;
|
|
153
154
|
case "record":
|
|
154
|
-
await
|
|
155
|
-
page:
|
|
155
|
+
await e.fillRecord({
|
|
156
|
+
page: o,
|
|
156
157
|
fieldKey: c,
|
|
157
158
|
fieldSchema: s,
|
|
158
|
-
value:
|
|
159
|
+
value: l,
|
|
159
160
|
onFillChildren: async () => {
|
|
160
|
-
await i(s.fields,
|
|
161
|
+
await i(s.fields, l, c);
|
|
161
162
|
}
|
|
162
163
|
});
|
|
163
164
|
break;
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
|
-
async function
|
|
167
|
-
const { itemKey: y, itemSchema: m } = A(c, s,
|
|
168
|
-
|
|
167
|
+
async function d(r, c, s, l) {
|
|
168
|
+
const { itemKey: y, itemSchema: m } = A(c, s, r);
|
|
169
|
+
p(m) ? await i(m.fields, l, y) : await w({
|
|
169
170
|
handlerType: h(m),
|
|
170
171
|
fieldKey: y,
|
|
171
172
|
fieldSchema: m,
|
|
172
|
-
value:
|
|
173
|
+
value: l
|
|
173
174
|
});
|
|
174
175
|
}
|
|
175
|
-
async function
|
|
176
|
-
const { entryKey: y, entrySchema: m } =
|
|
176
|
+
async function g(r, c, s, l) {
|
|
177
|
+
const { entryKey: y, entrySchema: m } = B(c, s, r);
|
|
177
178
|
await w({
|
|
178
179
|
handlerType: h(m),
|
|
179
180
|
fieldKey: y,
|
|
180
181
|
fieldSchema: m,
|
|
181
|
-
value:
|
|
182
|
+
value: l
|
|
182
183
|
});
|
|
183
184
|
}
|
|
184
|
-
async function
|
|
185
|
-
a.fields && Array.isArray(a.fields) && await i(a.fields,
|
|
185
|
+
async function k(r) {
|
|
186
|
+
a.fields && Array.isArray(a.fields) && await i(a.fields, r);
|
|
186
187
|
}
|
|
187
|
-
async function
|
|
188
|
-
const
|
|
189
|
-
if (!
|
|
190
|
-
throw new Error(`Field schema for "${
|
|
188
|
+
async function u(r, c, s) {
|
|
189
|
+
const l = t.schemaMap[r];
|
|
190
|
+
if (!l)
|
|
191
|
+
throw new Error(`Field schema for "${r}" not found in schema map`);
|
|
191
192
|
await w({
|
|
192
|
-
handlerType: h(
|
|
193
|
-
fieldKey:
|
|
194
|
-
fieldSchema:
|
|
193
|
+
handlerType: h(l),
|
|
194
|
+
fieldKey: r,
|
|
195
|
+
fieldSchema: l,
|
|
195
196
|
value: c
|
|
196
197
|
}, s);
|
|
197
198
|
}
|
|
198
199
|
return {
|
|
199
|
-
fill:
|
|
200
|
-
fillField:
|
|
200
|
+
fill: k,
|
|
201
|
+
fillField: u,
|
|
201
202
|
schemaMap: t.schemaMap,
|
|
202
|
-
handlers:
|
|
203
|
+
handlers: e
|
|
203
204
|
};
|
|
204
205
|
}
|
|
205
206
|
export {
|
|
206
207
|
U as createFiller,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
M as fillArray,
|
|
209
|
+
E as fillBoolean,
|
|
210
|
+
T as fillEnum,
|
|
210
211
|
J as fillForeign,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
$ as fillJson,
|
|
213
|
+
R as fillMap,
|
|
214
|
+
C as fillNumber,
|
|
214
215
|
x as fillRecord,
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
I as fillString,
|
|
217
|
+
j as fillTag,
|
|
217
218
|
H as handlers
|
|
218
219
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-plugins",
|
|
3
|
-
"version": "9.222.
|
|
3
|
+
"version": "9.222.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-plugins.umd.js",
|
|
6
6
|
"module": "./dist/entities-plugins.es.js",
|
|
@@ -92,9 +92,9 @@
|
|
|
92
92
|
"vue-router": "^5.1.0",
|
|
93
93
|
"zod": "^4.4.3",
|
|
94
94
|
"@kong-ui-public/entities-shared": "^3.53.3",
|
|
95
|
-
"@kong-ui-public/monaco-editor": "^0.22.23",
|
|
96
95
|
"@kong-ui-public/i18n": "^2.4.6",
|
|
97
|
-
"@kong-ui-public/entities-vaults": "^4.12.2"
|
|
96
|
+
"@kong-ui-public/entities-vaults": "^4.12.2",
|
|
97
|
+
"@kong-ui-public/monaco-editor": "^0.22.23"
|
|
98
98
|
},
|
|
99
99
|
"repository": {
|
|
100
100
|
"type": "git",
|
|
@@ -115,14 +115,14 @@
|
|
|
115
115
|
"lodash-es": "^4.18.1",
|
|
116
116
|
"marked": "^14.1.4",
|
|
117
117
|
"@kong-ui-public/entities-consumer-groups": "^4.5.36",
|
|
118
|
+
"@kong-ui-public/entities-plugins-icon": "^1.6.7",
|
|
118
119
|
"@kong-ui-public/entities-consumers": "^4.4.34",
|
|
119
120
|
"@kong-ui-public/entities-gateway-services": "^3.20.34",
|
|
120
121
|
"@kong-ui-public/entities-plugins-metadata": "^1.13.3",
|
|
121
|
-
"@kong-ui-public/entities-redis-configurations": "^1.15.
|
|
122
|
-
"@kong-ui-public/entities-
|
|
123
|
-
"@kong-ui-public/
|
|
124
|
-
"@kong-ui-public/entities-vaults": "^4.12.2"
|
|
125
|
-
"@kong-ui-public/forms": "^4.29.4"
|
|
122
|
+
"@kong-ui-public/entities-redis-configurations": "^1.15.47",
|
|
123
|
+
"@kong-ui-public/entities-routes": "^3.22.43",
|
|
124
|
+
"@kong-ui-public/forms": "^4.29.5",
|
|
125
|
+
"@kong-ui-public/entities-vaults": "^4.12.2"
|
|
126
126
|
},
|
|
127
127
|
"scripts": {
|
|
128
128
|
"dev": "cross-env USE_SANDBOX=true vite",
|