@kong-ui-public/entities-plugins 9.244.0 → 9.245.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/dist/Reflect-Dx24sqoM.js +826 -0
- package/dist/entities-plugins.es.js +13678 -15985
- package/dist/entities-plugins.umd.js +146 -252
- package/dist/filler/cypress/index.js +74 -76
- package/dist/filler/{field-walker-Cc7ahQwd.js → field-walker-BKYEagiA.js} +1639 -1674
- package/dist/filler/playwright/index.js +48 -49
- package/dist/freeform/index.js +1256 -2746
- package/dist/{json.es-CS7HRQjE.js → json.es-x1x2doiG.js} +8 -0
- package/dist/style.css +1 -1
- package/dist/{x509.es-Dy1NSH1z.js → x509.es-D0Xn7cId.js} +3775 -3927
- package/package.json +17 -17
- package/dist/Reflect-DRBLqlES.js +0 -835
|
@@ -1,114 +1,112 @@
|
|
|
1
|
-
import { s as a, i as w, c as
|
|
1
|
+
import { s as a, i as w, c as v, g as k, w as S, a as A, b as B, d as F } from "../field-walker-BKYEagiA.js";
|
|
2
2
|
const f = { scrollBehavior: "center" };
|
|
3
|
-
function
|
|
3
|
+
function p(i) {
|
|
4
4
|
cy.get(i).then((n) => {
|
|
5
|
-
|
|
6
|
-
(t = n[0]) == null || t.scrollIntoView({ block: "center", inline: "nearest" });
|
|
5
|
+
n[0]?.scrollIntoView({ block: "center", inline: "nearest" });
|
|
7
6
|
});
|
|
8
7
|
}
|
|
9
8
|
function I(i) {
|
|
10
|
-
const { fieldKey: n, value:
|
|
11
|
-
|
|
12
|
-
cy.wrap(o).clear(f),
|
|
9
|
+
const { fieldKey: n, value: e } = i, t = a.field(n);
|
|
10
|
+
p(t), cy.get(t).then((o) => {
|
|
11
|
+
cy.wrap(o).clear(f), e != null && e !== "" && cy.wrap(o).type(String(e), f);
|
|
13
12
|
});
|
|
14
13
|
}
|
|
15
14
|
function C(i) {
|
|
16
|
-
const { fieldKey: n, value:
|
|
17
|
-
|
|
18
|
-
cy.wrap(o).clear(f),
|
|
15
|
+
const { fieldKey: n, value: e } = i, t = a.field(n);
|
|
16
|
+
p(t), cy.get(t).then((o) => {
|
|
17
|
+
cy.wrap(o).clear(f), e != null && cy.wrap(o).type(String(e), f);
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
20
|
function E(i) {
|
|
22
|
-
const { fieldKey: n, value:
|
|
23
|
-
|
|
21
|
+
const { fieldKey: n, value: e } = i, t = a.field(n);
|
|
22
|
+
p(t), e === !0 ? cy.get(t).check(f) : e === !1 && cy.get(t).uncheck(f);
|
|
24
23
|
}
|
|
25
24
|
function j(i) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
m(d), cy.get(d).click(f);
|
|
25
|
+
const { fieldKey: n, fieldSchema: e, value: t } = i, o = w(e), y = o ? Array.isArray(t) ? t : [t] : [t], d = a.field(n);
|
|
26
|
+
p(d), cy.get(d).click(f);
|
|
29
27
|
const g = a.selectTrigger(n);
|
|
30
|
-
for (const
|
|
31
|
-
if (
|
|
32
|
-
const
|
|
33
|
-
o && cy.get(g).find(
|
|
34
|
-
|
|
35
|
-
}), y.includes(
|
|
28
|
+
for (const u of e.one_of ?? e.elements?.one_of ?? [])
|
|
29
|
+
if (u != null) {
|
|
30
|
+
const m = o ? a.multiSelectItem(String(u)) : a.selectItem(String(u));
|
|
31
|
+
o && cy.get(g).find(m).within((l) => {
|
|
32
|
+
l.find("button.selected").length > 0 && cy.get("button").click(f);
|
|
33
|
+
}), y.includes(u) && cy.get(g).find(m).click(f);
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
function x(i) {
|
|
39
|
-
const { fieldKey: n, value:
|
|
40
|
-
|
|
37
|
+
const { fieldKey: n, value: e } = i, t = Array.isArray(e) ? e : [e], o = a.tagInput(n);
|
|
38
|
+
p(o), cy.get(o).type(t.join(","), f);
|
|
41
39
|
}
|
|
42
40
|
function M(i) {
|
|
43
|
-
const { fieldKey: n, value:
|
|
41
|
+
const { fieldKey: n, value: e, onFillItem: t } = i, o = a.arrayTabContainer(n), y = a.arrayBasicContainer(n);
|
|
44
42
|
cy.get("body").then((d) => {
|
|
45
43
|
const g = d.find(o).length > 0, u = d.find(y).length > 0;
|
|
46
44
|
if (g || u) {
|
|
47
|
-
const
|
|
45
|
+
const m = a.arrayRemoveBtns(n), l = () => {
|
|
48
46
|
cy.get("body").then((c) => {
|
|
49
|
-
const r = c.find(
|
|
47
|
+
const r = c.find(m).first();
|
|
50
48
|
r.length > 0 && (cy.wrap(r).click(f), l());
|
|
51
49
|
});
|
|
52
50
|
};
|
|
53
|
-
if (l(), !Array.isArray(
|
|
51
|
+
if (l(), !Array.isArray(e))
|
|
54
52
|
return;
|
|
55
|
-
for (let c = 0; c <
|
|
53
|
+
for (let c = 0; c < e.length; c++) {
|
|
56
54
|
const r = a.arrayAddBtn(n);
|
|
57
|
-
|
|
55
|
+
p(r), cy.get(r).click(f), cy.get(a.arrayItem(n, c)).should("exist"), t(c, e[c]);
|
|
58
56
|
}
|
|
59
57
|
}
|
|
60
58
|
});
|
|
61
59
|
}
|
|
62
60
|
function R(i) {
|
|
63
|
-
const { fieldKey: n, value:
|
|
61
|
+
const { fieldKey: n, value: e, onFillChildren: t } = i, o = a.objectSwitch(n);
|
|
64
62
|
cy.get("body").then((y) => {
|
|
65
63
|
const d = y.find(o).length > 0;
|
|
66
|
-
if (
|
|
64
|
+
if (e == null && d) {
|
|
67
65
|
cy.get(o).uncheck({ force: !0 });
|
|
68
66
|
return;
|
|
69
67
|
}
|
|
70
|
-
d && (cy.get(o).check({ force: !0 }), cy.get(a.objectContent(n)).should("not.have.class", "ff-slide-active")),
|
|
68
|
+
d && (cy.get(o).check({ force: !0 }), cy.get(a.objectContent(n)).should("not.have.class", "ff-slide-active")), t();
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
71
|
function T(i, n) {
|
|
74
72
|
if (!i)
|
|
75
73
|
throw new Error(`Unable to find map entry test id for "${n}"`);
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
74
|
+
const e = i.match(/kid:\d+/);
|
|
75
|
+
if (!e)
|
|
78
76
|
throw new Error(`Unable to extract map entry kid id from test id "${i}"`);
|
|
79
|
-
return
|
|
77
|
+
return e[0];
|
|
80
78
|
}
|
|
81
79
|
function N(i) {
|
|
82
|
-
const { fieldKey: n, value:
|
|
80
|
+
const { fieldKey: n, value: e, onFillEntry: t } = i, o = a.mapRemoveBtns(n), y = () => {
|
|
83
81
|
cy.get("body").then((g) => {
|
|
84
82
|
const u = g.find(o).first();
|
|
85
83
|
u.length > 0 && (cy.wrap(u).click(f), y());
|
|
86
84
|
});
|
|
87
85
|
};
|
|
88
|
-
if (y(), typeof
|
|
86
|
+
if (y(), typeof e != "object" || e == null)
|
|
89
87
|
return;
|
|
90
|
-
const d = Object.entries(
|
|
88
|
+
const d = Object.entries(e);
|
|
91
89
|
if (d.length !== 0)
|
|
92
90
|
for (let g = 0; g < d.length; g++) {
|
|
93
|
-
const [u,
|
|
94
|
-
|
|
91
|
+
const [u, m] = d[g], l = a.mapAddBtn(n);
|
|
92
|
+
p(l), cy.get(l).click(f);
|
|
95
93
|
const c = a.mapKey(n, g);
|
|
96
|
-
|
|
94
|
+
p(c), cy.get(c).clear(f), cy.get(c).type(String(u), f), cy.get(a.mapContainer(n, g)).find(`[data-testid*="${n}.kid:"]`).first().invoke("attr", "data-testid").then((r) => {
|
|
97
95
|
const s = T(r, n);
|
|
98
|
-
|
|
96
|
+
t(s, m);
|
|
99
97
|
});
|
|
100
98
|
}
|
|
101
99
|
}
|
|
102
100
|
function O(i) {
|
|
103
|
-
const { fieldKey: n, value:
|
|
104
|
-
|
|
101
|
+
const { fieldKey: n, value: e } = i, t = a.json(n), o = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
102
|
+
p(t), cy.get(t).then((y) => {
|
|
105
103
|
cy.wrap(y.find("textarea")).clear(f), cy.wrap(y.find("textarea")).type(o, f);
|
|
106
104
|
});
|
|
107
105
|
}
|
|
108
106
|
function V(i) {
|
|
109
|
-
const { fieldKey: n, value:
|
|
110
|
-
|
|
111
|
-
const o = typeof
|
|
107
|
+
const { fieldKey: n, value: e } = i, t = a.field(n);
|
|
108
|
+
p(t), cy.get(t).click(f);
|
|
109
|
+
const o = typeof e == "object" && e?.id ? e.id : e;
|
|
112
110
|
o && cy.get(`[data-testid="select-item-${o}"]`).click(f);
|
|
113
111
|
}
|
|
114
112
|
const H = {
|
|
@@ -124,56 +122,56 @@ const H = {
|
|
|
124
122
|
fillForeign: V
|
|
125
123
|
};
|
|
126
124
|
function K(i, n) {
|
|
127
|
-
const
|
|
125
|
+
const e = v(i), t = { ...H, ...n };
|
|
128
126
|
function o(l, c, r = "") {
|
|
129
|
-
for (const s of
|
|
127
|
+
for (const s of S(l, c, e, r))
|
|
130
128
|
y(s);
|
|
131
129
|
}
|
|
132
130
|
function y({ handlerType: l, fieldKey: c, fieldSchema: r, value: s }) {
|
|
133
131
|
switch (l) {
|
|
134
132
|
case "string":
|
|
135
|
-
|
|
133
|
+
t.fillString({ fieldKey: c, fieldSchema: r, value: s });
|
|
136
134
|
break;
|
|
137
135
|
case "number":
|
|
138
|
-
|
|
136
|
+
t.fillNumber({ fieldKey: c, fieldSchema: r, value: s });
|
|
139
137
|
break;
|
|
140
138
|
case "boolean":
|
|
141
|
-
|
|
139
|
+
t.fillBoolean({ fieldKey: c, fieldSchema: r, value: s });
|
|
142
140
|
break;
|
|
143
141
|
case "enum":
|
|
144
|
-
|
|
142
|
+
t.fillEnum({ fieldKey: c, fieldSchema: r, value: s });
|
|
145
143
|
break;
|
|
146
144
|
case "tag":
|
|
147
|
-
|
|
145
|
+
t.fillTag({ fieldKey: c, fieldSchema: r, value: s });
|
|
148
146
|
break;
|
|
149
147
|
case "map":
|
|
150
|
-
|
|
148
|
+
t.fillMap({
|
|
151
149
|
fieldKey: c,
|
|
152
150
|
fieldSchema: r,
|
|
153
151
|
value: s,
|
|
154
|
-
onFillEntry: (b,
|
|
155
|
-
g(
|
|
152
|
+
onFillEntry: (b, h) => {
|
|
153
|
+
g(e, c, b, h);
|
|
156
154
|
}
|
|
157
155
|
});
|
|
158
156
|
break;
|
|
159
157
|
case "json":
|
|
160
|
-
|
|
158
|
+
t.fillJson({ fieldKey: c, fieldSchema: r, value: s });
|
|
161
159
|
break;
|
|
162
160
|
case "foreign":
|
|
163
|
-
|
|
161
|
+
t.fillForeign({ fieldKey: c, fieldSchema: r, value: s });
|
|
164
162
|
break;
|
|
165
163
|
case "array":
|
|
166
|
-
|
|
164
|
+
t.fillArray({
|
|
167
165
|
fieldKey: c,
|
|
168
166
|
fieldSchema: r,
|
|
169
167
|
value: s,
|
|
170
|
-
onFillItem: (b,
|
|
171
|
-
d(
|
|
168
|
+
onFillItem: (b, h) => {
|
|
169
|
+
d(e, c, b, h);
|
|
172
170
|
}
|
|
173
171
|
});
|
|
174
172
|
break;
|
|
175
173
|
case "record":
|
|
176
|
-
|
|
174
|
+
t.fillRecord({
|
|
177
175
|
fieldKey: c,
|
|
178
176
|
fieldSchema: r,
|
|
179
177
|
value: s,
|
|
@@ -185,28 +183,28 @@ function K(i, n) {
|
|
|
185
183
|
}
|
|
186
184
|
}
|
|
187
185
|
function d(l, c, r, s) {
|
|
188
|
-
const { itemKey: b, itemSchema:
|
|
189
|
-
B(
|
|
190
|
-
handlerType: k(
|
|
186
|
+
const { itemKey: b, itemSchema: h } = A(c, r, l);
|
|
187
|
+
B(h) ? o(h.fields, s, b) : y({
|
|
188
|
+
handlerType: k(h),
|
|
191
189
|
fieldKey: b,
|
|
192
|
-
fieldSchema:
|
|
190
|
+
fieldSchema: h,
|
|
193
191
|
value: s
|
|
194
192
|
});
|
|
195
193
|
}
|
|
196
194
|
function g(l, c, r, s) {
|
|
197
|
-
const { entryKey: b, entrySchema:
|
|
195
|
+
const { entryKey: b, entrySchema: h } = F(c, r, l);
|
|
198
196
|
y({
|
|
199
|
-
handlerType: k(
|
|
197
|
+
handlerType: k(h),
|
|
200
198
|
fieldKey: b,
|
|
201
|
-
fieldSchema:
|
|
199
|
+
fieldSchema: h,
|
|
202
200
|
value: s
|
|
203
201
|
});
|
|
204
202
|
}
|
|
205
203
|
function u(l) {
|
|
206
204
|
i.fields && Array.isArray(i.fields) && o(i.fields, l);
|
|
207
205
|
}
|
|
208
|
-
function
|
|
209
|
-
const r =
|
|
206
|
+
function m(l, c) {
|
|
207
|
+
const r = e.schemaMap[l];
|
|
210
208
|
if (!r)
|
|
211
209
|
throw new Error(`Field schema for "${l}" not found in schema map`);
|
|
212
210
|
y({
|
|
@@ -218,9 +216,9 @@ function K(i, n) {
|
|
|
218
216
|
}
|
|
219
217
|
return {
|
|
220
218
|
fill: u,
|
|
221
|
-
fillField:
|
|
222
|
-
schemaMap:
|
|
223
|
-
handlers:
|
|
219
|
+
fillField: m,
|
|
220
|
+
schemaMap: e.schemaMap,
|
|
221
|
+
handlers: t
|
|
224
222
|
};
|
|
225
223
|
}
|
|
226
224
|
export {
|
|
@@ -237,5 +235,5 @@ export {
|
|
|
237
235
|
I as fillString,
|
|
238
236
|
x as fillTag,
|
|
239
237
|
H as handlers,
|
|
240
|
-
|
|
238
|
+
p as scrollIntoViewNative
|
|
241
239
|
};
|