@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,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"}
|