@kong-ui-public/entities-plugins 9.244.0 → 9.246.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/freeform/style.css +1 -1
- 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 +20 -20
- package/dist/Reflect-DRBLqlES.js +0 -835
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as f, i as h, c as p, g as k, w as S, a as
|
|
1
|
+
import { s as f, i as h, c as p, g as k, w as S, a as v, b as F, d as A } from "../field-walker-BKYEagiA.js";
|
|
2
2
|
async function B(o) {
|
|
3
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));
|
|
@@ -12,14 +12,13 @@ async function E(o) {
|
|
|
12
12
|
t === !0 ? await i.check() : t === !1 && await i.uncheck();
|
|
13
13
|
}
|
|
14
14
|
async function I(o) {
|
|
15
|
-
var b;
|
|
16
15
|
const { page: a, fieldKey: n, fieldSchema: t, value: e } = o, i = h(t), w = i ? Array.isArray(e) ? e : [e] : [e], d = f.field(n);
|
|
17
16
|
await a.locator(d).click();
|
|
18
17
|
const m = f.selectTrigger(n);
|
|
19
|
-
for (const u of t.one_of ??
|
|
18
|
+
for (const u of t.one_of ?? t.elements?.one_of ?? [])
|
|
20
19
|
if (u != null) {
|
|
21
|
-
const
|
|
22
|
-
i && await a.locator(m).locator(`${
|
|
20
|
+
const b = i ? f.multiSelectItem(String(u)) : f.selectItem(String(u));
|
|
21
|
+
i && await a.locator(m).locator(`${b} button.selected`).count() > 0 && await a.locator(m).locator(b).click(), w.includes(u) && await a.locator(m).locator(b).click();
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
async function j(o) {
|
|
@@ -29,14 +28,14 @@ async function j(o) {
|
|
|
29
28
|
async function M(o) {
|
|
30
29
|
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, m = await a.locator(w).count() > 0;
|
|
31
30
|
if (d || m) {
|
|
32
|
-
const
|
|
33
|
-
await a.locator(
|
|
31
|
+
const u = f.arrayRemoveBtns(n), b = async () => {
|
|
32
|
+
await a.locator(u).count() > 0 && (await a.locator(u).first().click(), await b());
|
|
34
33
|
};
|
|
35
|
-
if (await
|
|
34
|
+
if (await b(), !Array.isArray(t))
|
|
36
35
|
return;
|
|
37
|
-
for (let
|
|
36
|
+
for (let r = 0; r < t.length; r++) {
|
|
38
37
|
const c = f.arrayAddBtn(n);
|
|
39
|
-
await a.locator(c).click(), await e(
|
|
38
|
+
await a.locator(c).click(), await e(r, t[r]);
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -66,16 +65,16 @@ async function R(o) {
|
|
|
66
65
|
const w = Object.entries(t);
|
|
67
66
|
if (w.length !== 0)
|
|
68
67
|
for (let d = 0; d < w.length; d++) {
|
|
69
|
-
const [m,
|
|
68
|
+
const [m, u] = w[d];
|
|
70
69
|
await a.locator(f.mapAddBtn(n)).click();
|
|
71
|
-
const
|
|
72
|
-
await
|
|
70
|
+
const b = f.mapContainer(n, d), r = a.locator(b);
|
|
71
|
+
await r.waitFor();
|
|
73
72
|
const c = a.locator(f.mapKey(n, d));
|
|
74
73
|
await c.clear(), await c.fill(String(m));
|
|
75
|
-
const
|
|
76
|
-
await
|
|
77
|
-
const s = x(await
|
|
78
|
-
await e(s,
|
|
74
|
+
const l = r.locator(`[data-testid*="${n}.kid:"]`).first();
|
|
75
|
+
await l.waitFor();
|
|
76
|
+
const s = x(await l.getAttribute("data-testid"), n);
|
|
77
|
+
await e(s, u);
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
async function $(o) {
|
|
@@ -85,7 +84,7 @@ async function $(o) {
|
|
|
85
84
|
async function N(o) {
|
|
86
85
|
const { page: a, fieldKey: n, value: t } = o, e = f.field(n);
|
|
87
86
|
await a.locator(e).click();
|
|
88
|
-
const i = typeof t == "object" &&
|
|
87
|
+
const i = typeof t == "object" && t?.id ? t.id : t;
|
|
89
88
|
i && await a.locator(`[data-testid="select-item-${i}"]`).click();
|
|
90
89
|
}
|
|
91
90
|
const J = {
|
|
@@ -102,32 +101,32 @@ const J = {
|
|
|
102
101
|
};
|
|
103
102
|
function K(o, a, n) {
|
|
104
103
|
const t = p(a), e = { ...J, ...n };
|
|
105
|
-
async function i(
|
|
106
|
-
for (const s of S(
|
|
104
|
+
async function i(r, c, l = "") {
|
|
105
|
+
for (const s of S(r, c, t, l))
|
|
107
106
|
await w(s);
|
|
108
107
|
}
|
|
109
|
-
async function w({ handlerType:
|
|
110
|
-
switch (
|
|
108
|
+
async function w({ handlerType: r, fieldKey: c, fieldSchema: l, value: s }) {
|
|
109
|
+
switch (r) {
|
|
111
110
|
case "string":
|
|
112
|
-
await e.fillString({ page: o, fieldKey: c, fieldSchema:
|
|
111
|
+
await e.fillString({ page: o, fieldKey: c, fieldSchema: l, value: s });
|
|
113
112
|
break;
|
|
114
113
|
case "number":
|
|
115
|
-
await e.fillNumber({ page: o, fieldKey: c, fieldSchema:
|
|
114
|
+
await e.fillNumber({ page: o, fieldKey: c, fieldSchema: l, value: s });
|
|
116
115
|
break;
|
|
117
116
|
case "boolean":
|
|
118
|
-
await e.fillBoolean({ page: o, fieldKey: c, fieldSchema:
|
|
117
|
+
await e.fillBoolean({ page: o, fieldKey: c, fieldSchema: l, value: s });
|
|
119
118
|
break;
|
|
120
119
|
case "enum":
|
|
121
|
-
await e.fillEnum({ page: o, fieldKey: c, fieldSchema:
|
|
120
|
+
await e.fillEnum({ page: o, fieldKey: c, fieldSchema: l, value: s });
|
|
122
121
|
break;
|
|
123
122
|
case "tag":
|
|
124
|
-
await e.fillTag({ page: o, fieldKey: c, fieldSchema:
|
|
123
|
+
await e.fillTag({ page: o, fieldKey: c, fieldSchema: l, value: s });
|
|
125
124
|
break;
|
|
126
125
|
case "map":
|
|
127
126
|
await e.fillMap({
|
|
128
127
|
page: o,
|
|
129
128
|
fieldKey: c,
|
|
130
|
-
fieldSchema:
|
|
129
|
+
fieldSchema: l,
|
|
131
130
|
value: s,
|
|
132
131
|
onFillEntry: async (g, y) => {
|
|
133
132
|
await m(t, c, g, y);
|
|
@@ -135,16 +134,16 @@ function K(o, a, n) {
|
|
|
135
134
|
});
|
|
136
135
|
break;
|
|
137
136
|
case "json":
|
|
138
|
-
await e.fillJson({ page: o, fieldKey: c, fieldSchema:
|
|
137
|
+
await e.fillJson({ page: o, fieldKey: c, fieldSchema: l, value: s });
|
|
139
138
|
break;
|
|
140
139
|
case "foreign":
|
|
141
|
-
await e.fillForeign({ page: o, fieldKey: c, fieldSchema:
|
|
140
|
+
await e.fillForeign({ page: o, fieldKey: c, fieldSchema: l, value: s });
|
|
142
141
|
break;
|
|
143
142
|
case "array":
|
|
144
143
|
await e.fillArray({
|
|
145
144
|
page: o,
|
|
146
145
|
fieldKey: c,
|
|
147
|
-
fieldSchema:
|
|
146
|
+
fieldSchema: l,
|
|
148
147
|
value: s,
|
|
149
148
|
onFillItem: async (g, y) => {
|
|
150
149
|
await d(t, c, g, y);
|
|
@@ -155,26 +154,26 @@ function K(o, a, n) {
|
|
|
155
154
|
await e.fillRecord({
|
|
156
155
|
page: o,
|
|
157
156
|
fieldKey: c,
|
|
158
|
-
fieldSchema:
|
|
157
|
+
fieldSchema: l,
|
|
159
158
|
value: s,
|
|
160
159
|
onFillChildren: async () => {
|
|
161
|
-
await i(
|
|
160
|
+
await i(l.fields, s, c);
|
|
162
161
|
}
|
|
163
162
|
});
|
|
164
163
|
break;
|
|
165
164
|
}
|
|
166
165
|
}
|
|
167
|
-
async function d(
|
|
168
|
-
const { itemKey: g, itemSchema: y } =
|
|
169
|
-
|
|
166
|
+
async function d(r, c, l, s) {
|
|
167
|
+
const { itemKey: g, itemSchema: y } = v(c, l, r);
|
|
168
|
+
F(y) ? await i(y.fields, s, g) : await w({
|
|
170
169
|
handlerType: k(y),
|
|
171
170
|
fieldKey: g,
|
|
172
171
|
fieldSchema: y,
|
|
173
172
|
value: s
|
|
174
173
|
});
|
|
175
174
|
}
|
|
176
|
-
async function m(
|
|
177
|
-
const { entryKey: g, entrySchema: y } = A(c,
|
|
175
|
+
async function m(r, c, l, s) {
|
|
176
|
+
const { entryKey: g, entrySchema: y } = A(c, l, r);
|
|
178
177
|
await w({
|
|
179
178
|
handlerType: k(y),
|
|
180
179
|
fieldKey: g,
|
|
@@ -182,23 +181,23 @@ function K(o, a, n) {
|
|
|
182
181
|
value: s
|
|
183
182
|
});
|
|
184
183
|
}
|
|
185
|
-
async function
|
|
186
|
-
a.fields && Array.isArray(a.fields) && await i(a.fields,
|
|
184
|
+
async function u(r) {
|
|
185
|
+
a.fields && Array.isArray(a.fields) && await i(a.fields, r);
|
|
187
186
|
}
|
|
188
|
-
async function
|
|
189
|
-
const
|
|
190
|
-
if (!
|
|
191
|
-
throw new Error(`Field schema for "${
|
|
187
|
+
async function b(r, c) {
|
|
188
|
+
const l = t.schemaMap[r];
|
|
189
|
+
if (!l)
|
|
190
|
+
throw new Error(`Field schema for "${r}" not found in schema map`);
|
|
192
191
|
await w({
|
|
193
|
-
handlerType: k(
|
|
194
|
-
fieldKey:
|
|
195
|
-
fieldSchema:
|
|
192
|
+
handlerType: k(l),
|
|
193
|
+
fieldKey: r,
|
|
194
|
+
fieldSchema: l,
|
|
196
195
|
value: c
|
|
197
196
|
});
|
|
198
197
|
}
|
|
199
198
|
return {
|
|
200
|
-
fill:
|
|
201
|
-
fillField:
|
|
199
|
+
fill: u,
|
|
200
|
+
fillField: b,
|
|
202
201
|
schemaMap: t.schemaMap,
|
|
203
202
|
handlers: e
|
|
204
203
|
};
|