@kong-ui-public/entities-plugins 9.222.2 → 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/dist/style.css +1 -1
- package/package.json +11 -11
|
@@ -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
|
};
|