twd-js 1.5.1 → 1.5.2
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/bundled.es.js +88 -80
- package/dist/cli.js +1 -1
- package/dist/index.cjs.js +18 -18
- package/dist/index.es.js +220 -212
- package/dist/mock-sw.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { handlers as sa, TestRunner as Rm } from "./runner.es.js";
|
|
2
2
|
import { c as _d, m as Em, j as D } from "./jsx-runtime-BGWd3k7q.mjs";
|
|
3
|
-
import { useRef as _o, useMemo as
|
|
3
|
+
import { useRef as _o, useMemo as za, useEffect as qa, useState as ta } from "react";
|
|
4
4
|
const xm = (e, t, r = 2e3, n = 50) => new Promise((o, a) => {
|
|
5
5
|
const i = Date.now(), s = () => {
|
|
6
6
|
const l = t();
|
|
@@ -17,7 +17,7 @@ const xm = (e, t, r = 2e3, n = 50) => new Promise((o, a) => {
|
|
|
17
17
|
setTimeout(s, n);
|
|
18
18
|
};
|
|
19
19
|
s();
|
|
20
|
-
}), la = (e) => new Promise((t) => setTimeout(t, e)),
|
|
20
|
+
}), la = (e) => new Promise((t) => setTimeout(t, e)), oi = (e, t, r, n) => {
|
|
21
21
|
if (!e && !t)
|
|
22
22
|
throw new Error(n);
|
|
23
23
|
if (e && t)
|
|
@@ -158,7 +158,7 @@ const _m = {
|
|
|
158
158
|
fail: (e) => `Assertion failed: Expected element to not have class "${e[0]}"`
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, Va = (e, t, ...r) => {
|
|
162
162
|
const n = t.startsWith("not."), o = n ? t.slice(4) : t, a = (e.textContent || "").trim(), i = _m[o];
|
|
163
163
|
if (!i)
|
|
164
164
|
throw new Error(`Unknown assertion: ${o}`);
|
|
@@ -204,7 +204,7 @@ const _m = {
|
|
|
204
204
|
default:
|
|
205
205
|
throw new Error(`Unknown assertion: ${o}`);
|
|
206
206
|
}
|
|
207
|
-
return
|
|
207
|
+
return oi(
|
|
208
208
|
l,
|
|
209
209
|
n,
|
|
210
210
|
i[s].pass(r),
|
|
@@ -213,7 +213,7 @@ const _m = {
|
|
|
213
213
|
}, me = (e) => {
|
|
214
214
|
const t = sa.size ? Array.from(sa.values()).find((r) => r.status === "running") : null;
|
|
215
215
|
t && t.logs?.push(e);
|
|
216
|
-
},
|
|
216
|
+
}, _a = "1.5.2", Pm = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
|
|
217
217
|
rules: [],
|
|
218
218
|
counts: {}
|
|
219
219
|
}), window.__TWD_MOCK_STATE__) : {
|
|
@@ -229,7 +229,7 @@ const Sm = async (e) => {
|
|
|
229
229
|
if ("serviceWorker" in navigator) {
|
|
230
230
|
Is = !0;
|
|
231
231
|
const t = e ?? "/mock-sw.js";
|
|
232
|
-
await navigator.serviceWorker.register(`${t}?v=${
|
|
232
|
+
await navigator.serviceWorker.register(`${t}?v=${_a}`), navigator.serviceWorker.controller || await new Promise((r) => {
|
|
233
233
|
navigator.serviceWorker.addEventListener("controllerchange", r, { once: !0 });
|
|
234
234
|
}), navigator.serviceWorker.addEventListener("message", (r) => {
|
|
235
235
|
if (r.data?.type === "EXECUTED") {
|
|
@@ -243,7 +243,7 @@ const Sm = async (e) => {
|
|
|
243
243
|
n !== -1 ? Xe[n] = r : Xe.push(r), navigator.serviceWorker.controller?.postMessage({
|
|
244
244
|
type: "ADD_RULE",
|
|
245
245
|
rule: r,
|
|
246
|
-
version:
|
|
246
|
+
version: _a
|
|
247
247
|
}), await la(Tm), await Promise.resolve();
|
|
248
248
|
}, Mm = async (e) => await Promise.all(
|
|
249
249
|
e.map((r) => Pd(r))
|
|
@@ -260,7 +260,7 @@ const Sm = async (e) => {
|
|
|
260
260
|
}, Td = () => Xe, Sd = () => {
|
|
261
261
|
navigator.serviceWorker.controller?.postMessage({
|
|
262
262
|
type: "CLEAR_RULES",
|
|
263
|
-
version:
|
|
263
|
+
version: _a
|
|
264
264
|
}), Xe.length = 0;
|
|
265
265
|
for (const e in ct.counts)
|
|
266
266
|
delete ct.counts[e];
|
|
@@ -268,14 +268,14 @@ const Sm = async (e) => {
|
|
|
268
268
|
const r = e.startsWith("not.");
|
|
269
269
|
switch (r ? e.slice(4) : e) {
|
|
270
270
|
case "eq":
|
|
271
|
-
return
|
|
271
|
+
return oi(
|
|
272
272
|
window.location.href === t,
|
|
273
273
|
r,
|
|
274
274
|
`Assertion passed: URL is ${t}`,
|
|
275
275
|
`Assertion failed: Expected URL to be ${t}, but got ${window.location.href}`
|
|
276
276
|
);
|
|
277
277
|
case "contain.url":
|
|
278
|
-
return
|
|
278
|
+
return oi(
|
|
279
279
|
window.location.href.includes(t),
|
|
280
280
|
r,
|
|
281
281
|
`Assertion passed: URL contains ${t}`,
|
|
@@ -311,7 +311,7 @@ const Sm = async (e) => {
|
|
|
311
311
|
const r = await xm(e, () => document.querySelector(t)), n = {
|
|
312
312
|
el: r,
|
|
313
313
|
should: (o, ...a) => {
|
|
314
|
-
const i =
|
|
314
|
+
const i = Va(r, o, ...a);
|
|
315
315
|
return me(i), n;
|
|
316
316
|
}
|
|
317
317
|
};
|
|
@@ -331,7 +331,7 @@ const Sm = async (e) => {
|
|
|
331
331
|
const o = {
|
|
332
332
|
el: n,
|
|
333
333
|
should: (a, ...i) => {
|
|
334
|
-
const s =
|
|
334
|
+
const s = Va(n, a, ...i);
|
|
335
335
|
return me(s), o;
|
|
336
336
|
}
|
|
337
337
|
};
|
|
@@ -349,7 +349,7 @@ const Sm = async (e) => {
|
|
|
349
349
|
getRequestCount: Om,
|
|
350
350
|
getRequestCounts: Im,
|
|
351
351
|
should: (e, t, ...r) => {
|
|
352
|
-
const n =
|
|
352
|
+
const n = Va(e, t, ...r);
|
|
353
353
|
me(n);
|
|
354
354
|
},
|
|
355
355
|
wait: la,
|
|
@@ -374,17 +374,17 @@ Ii(ua, {
|
|
|
374
374
|
checkError: () => fe,
|
|
375
375
|
compareByInspect: () => fa,
|
|
376
376
|
eql: () => af,
|
|
377
|
-
events: () =>
|
|
377
|
+
events: () => Aa,
|
|
378
378
|
expectTypes: () => Bd,
|
|
379
379
|
flag: () => U,
|
|
380
|
-
getActual: () =>
|
|
380
|
+
getActual: () => Ta,
|
|
381
381
|
getMessage: () => Di,
|
|
382
|
-
getName: () =>
|
|
382
|
+
getName: () => Ma,
|
|
383
383
|
getOperator: () => Xi,
|
|
384
384
|
getOwnEnumerableProperties: () => Yi,
|
|
385
385
|
getOwnEnumerablePropertySymbols: () => Ki,
|
|
386
386
|
getPathInfo: () => Li,
|
|
387
|
-
hasProperty: () =>
|
|
387
|
+
hasProperty: () => Sa,
|
|
388
388
|
inspect: () => H,
|
|
389
389
|
isNaN: () => pa,
|
|
390
390
|
isNumeric: () => ne,
|
|
@@ -407,20 +407,20 @@ Ii(fe, {
|
|
|
407
407
|
getConstructorName: () => kd,
|
|
408
408
|
getMessage: () => Dd
|
|
409
409
|
});
|
|
410
|
-
function
|
|
410
|
+
function Pa(e) {
|
|
411
411
|
return e instanceof Error || Object.prototype.toString.call(e) === "[object Error]";
|
|
412
412
|
}
|
|
413
|
-
x(
|
|
413
|
+
x(Pa, "isErrorInstance");
|
|
414
414
|
function Md(e) {
|
|
415
415
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
416
416
|
}
|
|
417
417
|
x(Md, "isRegExp");
|
|
418
418
|
function Od(e, t) {
|
|
419
|
-
return
|
|
419
|
+
return Pa(t) && e === t;
|
|
420
420
|
}
|
|
421
421
|
x(Od, "compatibleInstance");
|
|
422
422
|
function Id(e, t) {
|
|
423
|
-
return
|
|
423
|
+
return Pa(t) ? e.constructor === t.constructor || e instanceof t.constructor : (typeof t == "object" || typeof t == "function") && t.prototype ? e.constructor === t || e instanceof t : !1;
|
|
424
424
|
}
|
|
425
425
|
x(Id, "compatibleConstructor");
|
|
426
426
|
function Nd(e, t) {
|
|
@@ -430,7 +430,7 @@ function Nd(e, t) {
|
|
|
430
430
|
x(Nd, "compatibleMessage");
|
|
431
431
|
function kd(e) {
|
|
432
432
|
let t = e;
|
|
433
|
-
return
|
|
433
|
+
return Pa(e) ? t = e.constructor.name : typeof e == "function" && (t = e.name, t === "" && (t = new e().name || t)), t;
|
|
434
434
|
}
|
|
435
435
|
x(kd, "getConstructorName");
|
|
436
436
|
function Dd(e) {
|
|
@@ -503,10 +503,10 @@ function Bd(e, t) {
|
|
|
503
503
|
);
|
|
504
504
|
}
|
|
505
505
|
x(Bd, "expectTypes");
|
|
506
|
-
function
|
|
506
|
+
function Ta(e, t) {
|
|
507
507
|
return t.length > 4 ? t[4] : e._obj;
|
|
508
508
|
}
|
|
509
|
-
x(
|
|
509
|
+
x(Ta, "getActual");
|
|
510
510
|
var Ns = {
|
|
511
511
|
bold: ["1", "22"],
|
|
512
512
|
dim: ["2", "22"],
|
|
@@ -668,11 +668,11 @@ function Hd(e, t) {
|
|
|
668
668
|
return t.stylize(`${o}T${Fe(n[1], t.truncate - o.length - 1)}`, "date");
|
|
669
669
|
}
|
|
670
670
|
x(Hd, "inspectDate");
|
|
671
|
-
function
|
|
671
|
+
function ai(e, t) {
|
|
672
672
|
const r = e[Symbol.toStringTag] || "Function", n = e.name;
|
|
673
673
|
return n ? t.stylize(`[${r} ${Fe(n, t.truncate - 11)}]`, "special") : t.stylize(`[${r}]`, "special");
|
|
674
674
|
}
|
|
675
|
-
x(
|
|
675
|
+
x(ai, "inspectFunction");
|
|
676
676
|
function Wd([e, t], r) {
|
|
677
677
|
return r.truncate -= 4, e = r.inspect(e, r), r.truncate -= e.length, t = r.inspect(t, r), `${e} => ${t}`;
|
|
678
678
|
}
|
|
@@ -689,15 +689,15 @@ function Kd(e, t) {
|
|
|
689
689
|
}
|
|
690
690
|
x(Kd, "inspectMap");
|
|
691
691
|
var Um = Number.isNaN || ((e) => e !== e);
|
|
692
|
-
function
|
|
692
|
+
function ii(e, t) {
|
|
693
693
|
return Um(e) ? t.stylize("NaN", "number") : e === 1 / 0 ? t.stylize("Infinity", "number") : e === -1 / 0 ? t.stylize("-Infinity", "number") : e === 0 ? t.stylize(1 / e === 1 / 0 ? "+0" : "-0", "number") : t.stylize(Fe(String(e), t.truncate), "number");
|
|
694
694
|
}
|
|
695
|
-
x(
|
|
696
|
-
function
|
|
695
|
+
x(ii, "inspectNumber");
|
|
696
|
+
function si(e, t) {
|
|
697
697
|
let r = Fe(e.toString(), t.truncate - 1);
|
|
698
698
|
return r !== wt && (r += "n"), t.stylize(r, "bigint");
|
|
699
699
|
}
|
|
700
|
-
x(
|
|
700
|
+
x(si, "inspectBigInt");
|
|
701
701
|
function Yd(e, t) {
|
|
702
702
|
const r = e.toString().split("/")[2], n = t.truncate - (2 + r.length), o = e.source;
|
|
703
703
|
return t.stylize(`/${Fe(o, n)}/${r}`, "regexp");
|
|
@@ -727,14 +727,14 @@ function Qd(e) {
|
|
|
727
727
|
return zm[e] || `\\u${`0000${e.charCodeAt(0).toString(Vm)}`.slice(-4)}`;
|
|
728
728
|
}
|
|
729
729
|
x(Qd, "escape");
|
|
730
|
-
function
|
|
730
|
+
function li(e, t) {
|
|
731
731
|
return ks.test(e) && (e = e.replace(ks, Qd)), t.stylize(`'${Fe(e, t.truncate - 2)}'`, "string");
|
|
732
732
|
}
|
|
733
|
-
x(
|
|
734
|
-
function
|
|
733
|
+
x(li, "inspectString");
|
|
734
|
+
function ui(e) {
|
|
735
735
|
return "description" in Symbol.prototype ? e.description ? `Symbol(${e.description})` : "Symbol()" : e.toString();
|
|
736
736
|
}
|
|
737
|
-
x(
|
|
737
|
+
x(ui, "inspectSymbol");
|
|
738
738
|
var Hm = /* @__PURE__ */ x(() => "Promise{…}", "getPromiseValue"), Wm = Hm;
|
|
739
739
|
function Po(e, t) {
|
|
740
740
|
const r = Object.getOwnPropertyNames(e), n = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e) : [];
|
|
@@ -749,10 +749,10 @@ function Po(e, t) {
|
|
|
749
749
|
return o && a && (i = ", "), `{ ${o}${i}${a} }`;
|
|
750
750
|
}
|
|
751
751
|
x(Po, "inspectObject");
|
|
752
|
-
var
|
|
752
|
+
var Ha = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1;
|
|
753
753
|
function Zd(e, t) {
|
|
754
754
|
let r = "";
|
|
755
|
-
return
|
|
755
|
+
return Ha && Ha in e && (r = e[Ha]), r = r || e.constructor.name, (!r || r === "_class") && (r = "<Anonymous Class>"), t.truncate -= r.length, `${r}${Po(e, t)}`;
|
|
756
756
|
}
|
|
757
757
|
x(Zd, "inspectClass");
|
|
758
758
|
function ef(e, t) {
|
|
@@ -813,22 +813,22 @@ function ki(e, t) {
|
|
|
813
813
|
return u && u.length > l && (u = `${wt}(${e.children.length})`), `${o}${s}${a}${u}${i}`;
|
|
814
814
|
}
|
|
815
815
|
x(ki, "inspectHTML");
|
|
816
|
-
var Km = typeof Symbol == "function" && typeof Symbol.for == "function",
|
|
816
|
+
var Km = typeof Symbol == "function" && typeof Symbol.for == "function", Wa = Km ? /* @__PURE__ */ Symbol.for("chai/inspect") : "@@chai/inspect", Ga = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"), Ds = /* @__PURE__ */ new WeakMap(), js = {}, $s = {
|
|
817
817
|
undefined: /* @__PURE__ */ x((e, t) => t.stylize("undefined", "undefined"), "undefined"),
|
|
818
818
|
null: /* @__PURE__ */ x((e, t) => t.stylize("null", "null"), "null"),
|
|
819
819
|
boolean: /* @__PURE__ */ x((e, t) => t.stylize(String(e), "boolean"), "boolean"),
|
|
820
820
|
Boolean: /* @__PURE__ */ x((e, t) => t.stylize(String(e), "boolean"), "Boolean"),
|
|
821
|
-
number:
|
|
822
|
-
Number:
|
|
823
|
-
bigint:
|
|
824
|
-
BigInt:
|
|
825
|
-
string:
|
|
826
|
-
String:
|
|
827
|
-
function:
|
|
828
|
-
Function:
|
|
829
|
-
symbol:
|
|
821
|
+
number: ii,
|
|
822
|
+
Number: ii,
|
|
823
|
+
bigint: si,
|
|
824
|
+
BigInt: si,
|
|
825
|
+
string: li,
|
|
826
|
+
String: li,
|
|
827
|
+
function: ai,
|
|
828
|
+
Function: ai,
|
|
829
|
+
symbol: ui,
|
|
830
830
|
// A Symbol polyfill will return `Symbol` not `symbol` from typedetect
|
|
831
|
-
Symbol:
|
|
831
|
+
Symbol: ui,
|
|
832
832
|
Array: Vd,
|
|
833
833
|
Date: Hd,
|
|
834
834
|
Map: Kd,
|
|
@@ -854,7 +854,7 @@ var Km = typeof Symbol == "function" && typeof Symbol.for == "function", Ha = Km
|
|
|
854
854
|
Error: tf,
|
|
855
855
|
HTMLCollection: ca,
|
|
856
856
|
NodeList: ca
|
|
857
|
-
}, Ym = /* @__PURE__ */ x((e, t, r, n) =>
|
|
857
|
+
}, Ym = /* @__PURE__ */ x((e, t, r, n) => Wa in e && typeof e[Wa] == "function" ? e[Wa](t) : Ga in e && typeof e[Ga] == "function" ? e[Ga](t.depth, t, n) : "inspect" in e && typeof e.inspect == "function" ? e.inspect(t.depth, t) : "constructor" in e && Ds.has(e.constructor) ? Ds.get(e.constructor)(e, t) : js[r] ? js[r](e, t) : "", "inspectCustom"), Xm = Object.prototype.toString;
|
|
858
858
|
function To(e, t = {}) {
|
|
859
859
|
const r = Fd(t, To), { customInspect: n } = r;
|
|
860
860
|
let o = e === null ? "null" : typeof e;
|
|
@@ -1003,7 +1003,7 @@ function lt(e) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
x(lt, "objDisplay");
|
|
1005
1005
|
function Di(e, t) {
|
|
1006
|
-
let r = U(e, "negate"), n = U(e, "object"), o = t[3], a =
|
|
1006
|
+
let r = U(e, "negate"), n = U(e, "object"), o = t[3], a = Ta(e, t), i = r ? t[2] : t[1], s = U(e, "message");
|
|
1007
1007
|
return typeof i == "function" && (i = i()), i = i || "", i = i.replace(/#\{this\}/g, function() {
|
|
1008
1008
|
return lt(n);
|
|
1009
1009
|
}).replace(/#\{act\}/g, function() {
|
|
@@ -1020,7 +1020,7 @@ function Ee(e, t, r) {
|
|
|
1020
1020
|
(r || o !== "object" && o !== "ssfi" && o !== "lockSsfi" && o != "message") && (t.__flags[o] = n[o]);
|
|
1021
1021
|
}
|
|
1022
1022
|
x(Ee, "transferFlags");
|
|
1023
|
-
function
|
|
1023
|
+
function ci(e) {
|
|
1024
1024
|
if (typeof e > "u")
|
|
1025
1025
|
return "undefined";
|
|
1026
1026
|
if (e === null)
|
|
@@ -1028,7 +1028,7 @@ function ui(e) {
|
|
|
1028
1028
|
const t = e[Symbol.toStringTag];
|
|
1029
1029
|
return typeof t == "string" ? t : Object.prototype.toString.call(e).slice(8, -1);
|
|
1030
1030
|
}
|
|
1031
|
-
x(
|
|
1031
|
+
x(ci, "type");
|
|
1032
1032
|
function ji() {
|
|
1033
1033
|
this._key = "chai/deep-eql__" + Math.random() + Date.now();
|
|
1034
1034
|
}
|
|
@@ -1045,7 +1045,7 @@ ji.prototype = {
|
|
|
1045
1045
|
}, "set")
|
|
1046
1046
|
};
|
|
1047
1047
|
var of = typeof WeakMap == "function" ? WeakMap : ji;
|
|
1048
|
-
function
|
|
1048
|
+
function di(e, t, r) {
|
|
1049
1049
|
if (!r || dt(e) || dt(t))
|
|
1050
1050
|
return null;
|
|
1051
1051
|
var n = r.get(e);
|
|
@@ -1056,7 +1056,7 @@ function ci(e, t, r) {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
return null;
|
|
1058
1058
|
}
|
|
1059
|
-
x(
|
|
1059
|
+
x(di, "memoizeCompare");
|
|
1060
1060
|
function Eo(e, t, r, n) {
|
|
1061
1061
|
if (!(!r || dt(e) || dt(t))) {
|
|
1062
1062
|
var o = r.get(e);
|
|
@@ -1067,9 +1067,9 @@ x(Eo, "memoizeSet");
|
|
|
1067
1067
|
var af = Do;
|
|
1068
1068
|
function Do(e, t, r) {
|
|
1069
1069
|
if (r && r.comparator)
|
|
1070
|
-
return
|
|
1070
|
+
return fi(e, t, r);
|
|
1071
1071
|
var n = $i(e, t);
|
|
1072
|
-
return n !== null ? n :
|
|
1072
|
+
return n !== null ? n : fi(e, t, r);
|
|
1073
1073
|
}
|
|
1074
1074
|
x(Do, "deepEqual");
|
|
1075
1075
|
function $i(e, t) {
|
|
@@ -1077,12 +1077,12 @@ function $i(e, t) {
|
|
|
1077
1077
|
t !== t ? !0 : dt(e) || dt(t) ? !1 : null;
|
|
1078
1078
|
}
|
|
1079
1079
|
x($i, "simpleEqual");
|
|
1080
|
-
function
|
|
1080
|
+
function fi(e, t, r) {
|
|
1081
1081
|
r = r || {}, r.memoize = r.memoize === !1 ? !1 : r.memoize || new of();
|
|
1082
|
-
var n = r && r.comparator, o =
|
|
1082
|
+
var n = r && r.comparator, o = di(e, t, r.memoize);
|
|
1083
1083
|
if (o !== null)
|
|
1084
1084
|
return o;
|
|
1085
|
-
var a =
|
|
1085
|
+
var a = di(t, e, r.memoize);
|
|
1086
1086
|
if (a !== null)
|
|
1087
1087
|
return a;
|
|
1088
1088
|
if (n) {
|
|
@@ -1093,14 +1093,14 @@ function di(e, t, r) {
|
|
|
1093
1093
|
if (s !== null)
|
|
1094
1094
|
return s;
|
|
1095
1095
|
}
|
|
1096
|
-
var l =
|
|
1097
|
-
if (l !==
|
|
1096
|
+
var l = ci(e);
|
|
1097
|
+
if (l !== ci(t))
|
|
1098
1098
|
return Eo(e, t, r.memoize, !1), !1;
|
|
1099
1099
|
Eo(e, t, r.memoize, !0);
|
|
1100
1100
|
var u = sf(e, t, l, r);
|
|
1101
1101
|
return Eo(e, t, r.memoize, u), u;
|
|
1102
1102
|
}
|
|
1103
|
-
x(
|
|
1103
|
+
x(fi, "extensiveDeepEqual");
|
|
1104
1104
|
function sf(e, t, r, n) {
|
|
1105
1105
|
switch (r) {
|
|
1106
1106
|
case "String":
|
|
@@ -1137,9 +1137,9 @@ function sf(e, t, r, n) {
|
|
|
1137
1137
|
case "ArrayBuffer":
|
|
1138
1138
|
return Je(new Uint8Array(e), new Uint8Array(t), n);
|
|
1139
1139
|
case "Set":
|
|
1140
|
-
return
|
|
1140
|
+
return pi(e, t, n);
|
|
1141
1141
|
case "Map":
|
|
1142
|
-
return
|
|
1142
|
+
return pi(e, t, n);
|
|
1143
1143
|
case "Temporal.PlainDate":
|
|
1144
1144
|
case "Temporal.PlainTime":
|
|
1145
1145
|
case "Temporal.PlainDateTime":
|
|
@@ -1162,7 +1162,7 @@ function lf(e, t) {
|
|
|
1162
1162
|
return e.toString() === t.toString();
|
|
1163
1163
|
}
|
|
1164
1164
|
x(lf, "regexpEqual");
|
|
1165
|
-
function
|
|
1165
|
+
function pi(e, t, r) {
|
|
1166
1166
|
try {
|
|
1167
1167
|
if (e.size !== t.size)
|
|
1168
1168
|
return !1;
|
|
@@ -1178,7 +1178,7 @@ function fi(e, t, r) {
|
|
|
1178
1178
|
o.push([i, s]);
|
|
1179
1179
|
}, "gatherEntries")), Je(n.sort(), o.sort(), r);
|
|
1180
1180
|
}
|
|
1181
|
-
x(
|
|
1181
|
+
x(pi, "entriesEqual");
|
|
1182
1182
|
function Je(e, t, r) {
|
|
1183
1183
|
var n = e.length;
|
|
1184
1184
|
if (n !== t.length)
|
|
@@ -1199,7 +1199,7 @@ function cf(e) {
|
|
|
1199
1199
|
return typeof Symbol < "u" && typeof e == "object" && typeof Symbol.iterator < "u" && typeof e[Symbol.iterator] == "function";
|
|
1200
1200
|
}
|
|
1201
1201
|
x(cf, "hasIteratorFunction");
|
|
1202
|
-
function
|
|
1202
|
+
function mi(e) {
|
|
1203
1203
|
if (cf(e))
|
|
1204
1204
|
try {
|
|
1205
1205
|
return da(e[Symbol.iterator]());
|
|
@@ -1208,28 +1208,28 @@ function pi(e) {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
return [];
|
|
1210
1210
|
}
|
|
1211
|
-
x(
|
|
1211
|
+
x(mi, "getIteratorEntries");
|
|
1212
1212
|
function da(e) {
|
|
1213
1213
|
for (var t = e.next(), r = [t.value]; t.done === !1; )
|
|
1214
1214
|
t = e.next(), r.push(t.value);
|
|
1215
1215
|
return r;
|
|
1216
1216
|
}
|
|
1217
1217
|
x(da, "getGeneratorEntries");
|
|
1218
|
-
function
|
|
1218
|
+
function hi(e) {
|
|
1219
1219
|
var t = [];
|
|
1220
1220
|
for (var r in e)
|
|
1221
1221
|
t.push(r);
|
|
1222
1222
|
return t;
|
|
1223
1223
|
}
|
|
1224
|
-
x(
|
|
1225
|
-
function
|
|
1224
|
+
x(hi, "getEnumerableKeys");
|
|
1225
|
+
function bi(e) {
|
|
1226
1226
|
for (var t = [], r = Object.getOwnPropertySymbols(e), n = 0; n < r.length; n += 1) {
|
|
1227
1227
|
var o = r[n];
|
|
1228
1228
|
Object.getOwnPropertyDescriptor(e, o).enumerable && t.push(o);
|
|
1229
1229
|
}
|
|
1230
1230
|
return t;
|
|
1231
1231
|
}
|
|
1232
|
-
x(
|
|
1232
|
+
x(bi, "getEnumerableSymbols");
|
|
1233
1233
|
function Bi(e, t, r, n) {
|
|
1234
1234
|
var o = r.length;
|
|
1235
1235
|
if (o === 0)
|
|
@@ -1241,10 +1241,10 @@ function Bi(e, t, r, n) {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
x(Bi, "keysEqual");
|
|
1243
1243
|
function df(e, t, r) {
|
|
1244
|
-
var n =
|
|
1244
|
+
var n = hi(e), o = hi(t), a = bi(e), i = bi(t);
|
|
1245
1245
|
if (n = n.concat(a), o = o.concat(i), n.length && n.length === o.length)
|
|
1246
|
-
return Je(
|
|
1247
|
-
var s =
|
|
1246
|
+
return Je(vi(n).sort(), vi(o).sort()) === !1 ? !1 : Bi(e, t, n, r);
|
|
1247
|
+
var s = mi(e), l = mi(t);
|
|
1248
1248
|
return s.length && s.length === l.length ? (s.sort(), l.sort(), Je(s, l, r)) : n.length === 0 && s.length === 0 && o.length === 0 && l.length === 0;
|
|
1249
1249
|
}
|
|
1250
1250
|
x(df, "objectEqual");
|
|
@@ -1252,16 +1252,16 @@ function dt(e) {
|
|
|
1252
1252
|
return e === null || typeof e != "object";
|
|
1253
1253
|
}
|
|
1254
1254
|
x(dt, "isPrimitive");
|
|
1255
|
-
function
|
|
1255
|
+
function vi(e) {
|
|
1256
1256
|
return e.map(/* @__PURE__ */ x(function(r) {
|
|
1257
1257
|
return typeof r == "symbol" ? r.toString() : r;
|
|
1258
1258
|
}, "mapSymbol"));
|
|
1259
1259
|
}
|
|
1260
|
-
x(
|
|
1261
|
-
function
|
|
1260
|
+
x(vi, "mapSymbols");
|
|
1261
|
+
function Sa(e, t) {
|
|
1262
1262
|
return typeof e > "u" || e === null ? !1 : t in Object(e);
|
|
1263
1263
|
}
|
|
1264
|
-
x(
|
|
1264
|
+
x(Sa, "hasProperty");
|
|
1265
1265
|
function ff(e) {
|
|
1266
1266
|
return e.replace(/([^\\])\[/g, "$1.[").match(/(\\\.|[^.]+?)+/g).map((n) => {
|
|
1267
1267
|
if (n === "constructor" || n === "__proto__" || n === "prototype")
|
|
@@ -1272,7 +1272,7 @@ function ff(e) {
|
|
|
1272
1272
|
});
|
|
1273
1273
|
}
|
|
1274
1274
|
x(ff, "parsePath");
|
|
1275
|
-
function
|
|
1275
|
+
function gi(e, t, r) {
|
|
1276
1276
|
let n = e, o = null;
|
|
1277
1277
|
r = typeof r > "u" ? t.length : r;
|
|
1278
1278
|
for (let a = 0; a < r; a++) {
|
|
@@ -1281,14 +1281,14 @@ function vi(e, t, r) {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
return o;
|
|
1283
1283
|
}
|
|
1284
|
-
x(
|
|
1284
|
+
x(gi, "internalGetPathValue");
|
|
1285
1285
|
function Li(e, t) {
|
|
1286
1286
|
const r = ff(t), n = r[r.length - 1], o = {
|
|
1287
|
-
parent: r.length > 1 ?
|
|
1287
|
+
parent: r.length > 1 ? gi(e, r, r.length - 1) : e,
|
|
1288
1288
|
name: n.p || n.i,
|
|
1289
|
-
value:
|
|
1289
|
+
value: gi(e, r)
|
|
1290
1290
|
};
|
|
1291
|
-
return o.exists =
|
|
1291
|
+
return o.exists = Sa(o.parent, o.name), o;
|
|
1292
1292
|
}
|
|
1293
1293
|
x(Li, "getPathInfo");
|
|
1294
1294
|
var pf = class mf {
|
|
@@ -1417,7 +1417,7 @@ var pf = class mf {
|
|
|
1417
1417
|
if (i !== !1 && (i = !0), o === void 0 && a === void 0 && (i = !1), ae.showDiff !== !0 && (i = !1), !s) {
|
|
1418
1418
|
r = Di(this, arguments);
|
|
1419
1419
|
const u = {
|
|
1420
|
-
actual:
|
|
1420
|
+
actual: Ta(this, arguments),
|
|
1421
1421
|
expected: o,
|
|
1422
1422
|
showDiff: i
|
|
1423
1423
|
}, d = Xi(this, arguments);
|
|
@@ -1447,7 +1447,7 @@ var pf = class mf {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
};
|
|
1449
1449
|
x(pf, "Assertion");
|
|
1450
|
-
var b = pf,
|
|
1450
|
+
var b = pf, Aa = new EventTarget(), hf = class extends Event {
|
|
1451
1451
|
constructor(t, r, n) {
|
|
1452
1452
|
super(t), this.name = String(r), this.fn = n;
|
|
1453
1453
|
}
|
|
@@ -1469,7 +1469,7 @@ function Ui(e, t, r) {
|
|
|
1469
1469
|
return Ee(this, a), a;
|
|
1470
1470
|
}, "propertyGetter"),
|
|
1471
1471
|
configurable: !0
|
|
1472
|
-
}),
|
|
1472
|
+
}), Aa.dispatchEvent(new Fi("addProperty", t, r));
|
|
1473
1473
|
}
|
|
1474
1474
|
x(Ui, "addProperty");
|
|
1475
1475
|
var Jm = Object.getOwnPropertyDescriptor(function() {
|
|
@@ -1557,7 +1557,7 @@ function zi(e, t, r) {
|
|
|
1557
1557
|
let a = new b();
|
|
1558
1558
|
return Ee(this, a), a;
|
|
1559
1559
|
}, "methodWrapper");
|
|
1560
|
-
$o(n, t, !1), e[t] = Tt(n, t),
|
|
1560
|
+
$o(n, t, !1), e[t] = Tt(n, t), Aa.dispatchEvent(new Fi("addMethod", t, r));
|
|
1561
1561
|
}
|
|
1562
1562
|
x(zi, "addMethod");
|
|
1563
1563
|
function Vi(e, t, r) {
|
|
@@ -1638,7 +1638,7 @@ function Wi(e, t, r, n) {
|
|
|
1638
1638
|
return Ee(this, i), Tt(i);
|
|
1639
1639
|
}, "chainableMethodGetter"),
|
|
1640
1640
|
configurable: !0
|
|
1641
|
-
}),
|
|
1641
|
+
}), Aa.dispatchEvent(
|
|
1642
1642
|
new rh(
|
|
1643
1643
|
"addChainableMethod",
|
|
1644
1644
|
t,
|
|
@@ -1697,10 +1697,10 @@ function Xi(e, t) {
|
|
|
1697
1697
|
return /\snot\s/.test(a) ? i ? "notDeepStrictEqual" : "notStrictEqual" : i ? "deepStrictEqual" : "strictEqual";
|
|
1698
1698
|
}
|
|
1699
1699
|
x(Xi, "getOperator");
|
|
1700
|
-
function
|
|
1700
|
+
function Ma(e) {
|
|
1701
1701
|
return e.name;
|
|
1702
1702
|
}
|
|
1703
|
-
x(
|
|
1703
|
+
x(Ma, "getName");
|
|
1704
1704
|
function ma(e) {
|
|
1705
1705
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
1706
1706
|
}
|
|
@@ -1951,7 +1951,7 @@ b.addProperty("empty", function() {
|
|
|
1951
1951
|
t
|
|
1952
1952
|
);
|
|
1953
1953
|
case "function": {
|
|
1954
|
-
const o = r + ".empty was passed a function " +
|
|
1954
|
+
const o = r + ".empty was passed a function " + Ma(e);
|
|
1955
1955
|
throw new G(o.trim(), void 0, t);
|
|
1956
1956
|
}
|
|
1957
1957
|
default:
|
|
@@ -1980,7 +1980,7 @@ function Zi() {
|
|
|
1980
1980
|
x(Zi, "checkArguments");
|
|
1981
1981
|
b.addProperty("arguments", Zi);
|
|
1982
1982
|
b.addProperty("Arguments", Zi);
|
|
1983
|
-
function
|
|
1983
|
+
function Oa(e, t) {
|
|
1984
1984
|
t && R(this, "message", t);
|
|
1985
1985
|
let r = R(this, "object");
|
|
1986
1986
|
if (R(this, "deep")) {
|
|
@@ -1996,10 +1996,10 @@ function Ma(e, t) {
|
|
|
1996
1996
|
!0
|
|
1997
1997
|
);
|
|
1998
1998
|
}
|
|
1999
|
-
x(
|
|
2000
|
-
b.addMethod("equal",
|
|
2001
|
-
b.addMethod("equals",
|
|
2002
|
-
b.addMethod("eq",
|
|
1999
|
+
x(Oa, "assertEqual");
|
|
2000
|
+
b.addMethod("equal", Oa);
|
|
2001
|
+
b.addMethod("equals", Oa);
|
|
2002
|
+
b.addMethod("eq", Oa);
|
|
2003
2003
|
function es(e, t) {
|
|
2004
2004
|
t && R(this, "message", t);
|
|
2005
2005
|
let r = R(this, "eql");
|
|
@@ -2015,7 +2015,7 @@ function es(e, t) {
|
|
|
2015
2015
|
x(es, "assertEql");
|
|
2016
2016
|
b.addMethod("eql", es);
|
|
2017
2017
|
b.addMethod("eqls", es);
|
|
2018
|
-
function
|
|
2018
|
+
function Ia(e, t) {
|
|
2019
2019
|
t && R(this, "message", t);
|
|
2020
2020
|
let r = R(this, "object"), n = R(this, "doLength"), o = R(this, "message"), a = o ? o + ": " : "", i = R(this, "ssfi"), s = Q(r).toLowerCase(), l = Q(e).toLowerCase();
|
|
2021
2021
|
if (n && s !== "map" && s !== "set" && new b(r, o, i, !0).to.have.property("length"), !n && s === "date" && l !== "date")
|
|
@@ -2055,11 +2055,11 @@ function Oa(e, t) {
|
|
|
2055
2055
|
e
|
|
2056
2056
|
);
|
|
2057
2057
|
}
|
|
2058
|
-
x(
|
|
2059
|
-
b.addMethod("above",
|
|
2060
|
-
b.addMethod("gt",
|
|
2061
|
-
b.addMethod("greaterThan",
|
|
2062
|
-
function
|
|
2058
|
+
x(Ia, "assertAbove");
|
|
2059
|
+
b.addMethod("above", Ia);
|
|
2060
|
+
b.addMethod("gt", Ia);
|
|
2061
|
+
b.addMethod("greaterThan", Ia);
|
|
2062
|
+
function Na(e, t) {
|
|
2063
2063
|
t && R(this, "message", t);
|
|
2064
2064
|
let r = R(this, "object"), n = R(this, "doLength"), o = R(this, "message"), a = o ? o + ": " : "", i = R(this, "ssfi"), s = Q(r).toLowerCase(), l = Q(e).toLowerCase(), u, d = !0;
|
|
2065
2065
|
if (n && s !== "map" && s !== "set" && new b(r, o, i, !0).to.have.property("length"), !n && s === "date" && l !== "date")
|
|
@@ -2090,11 +2090,11 @@ function Ia(e, t) {
|
|
|
2090
2090
|
e
|
|
2091
2091
|
);
|
|
2092
2092
|
}
|
|
2093
|
-
x(
|
|
2094
|
-
b.addMethod("least",
|
|
2095
|
-
b.addMethod("gte",
|
|
2096
|
-
b.addMethod("greaterThanOrEqual",
|
|
2097
|
-
function
|
|
2093
|
+
x(Na, "assertLeast");
|
|
2094
|
+
b.addMethod("least", Na);
|
|
2095
|
+
b.addMethod("gte", Na);
|
|
2096
|
+
b.addMethod("greaterThanOrEqual", Na);
|
|
2097
|
+
function ka(e, t) {
|
|
2098
2098
|
t && R(this, "message", t);
|
|
2099
2099
|
let r = R(this, "object"), n = R(this, "doLength"), o = R(this, "message"), a = o ? o + ": " : "", i = R(this, "ssfi"), s = Q(r).toLowerCase(), l = Q(e).toLowerCase(), u, d = !0;
|
|
2100
2100
|
if (n && s !== "map" && s !== "set" && new b(r, o, i, !0).to.have.property("length"), !n && s === "date" && l !== "date")
|
|
@@ -2125,11 +2125,11 @@ function Na(e, t) {
|
|
|
2125
2125
|
e
|
|
2126
2126
|
);
|
|
2127
2127
|
}
|
|
2128
|
-
x(
|
|
2129
|
-
b.addMethod("below",
|
|
2130
|
-
b.addMethod("lt",
|
|
2131
|
-
b.addMethod("lessThan",
|
|
2132
|
-
function
|
|
2128
|
+
x(ka, "assertBelow");
|
|
2129
|
+
b.addMethod("below", ka);
|
|
2130
|
+
b.addMethod("lt", ka);
|
|
2131
|
+
b.addMethod("lessThan", ka);
|
|
2132
|
+
function Da(e, t) {
|
|
2133
2133
|
t && R(this, "message", t);
|
|
2134
2134
|
let r = R(this, "object"), n = R(this, "doLength"), o = R(this, "message"), a = o ? o + ": " : "", i = R(this, "ssfi"), s = Q(r).toLowerCase(), l = Q(e).toLowerCase(), u, d = !0;
|
|
2135
2135
|
if (n && s !== "map" && s !== "set" && new b(r, o, i, !0).to.have.property("length"), !n && s === "date" && l !== "date")
|
|
@@ -2160,10 +2160,10 @@ function ka(e, t) {
|
|
|
2160
2160
|
e
|
|
2161
2161
|
);
|
|
2162
2162
|
}
|
|
2163
|
-
x(
|
|
2164
|
-
b.addMethod("most",
|
|
2165
|
-
b.addMethod("lte",
|
|
2166
|
-
b.addMethod("lessThanOrEqual",
|
|
2163
|
+
x(Da, "assertMost");
|
|
2164
|
+
b.addMethod("most", Da);
|
|
2165
|
+
b.addMethod("lte", Da);
|
|
2166
|
+
b.addMethod("lessThanOrEqual", Da);
|
|
2167
2167
|
b.addMethod("within", function(e, t, r) {
|
|
2168
2168
|
r && R(this, "message", r);
|
|
2169
2169
|
let n = R(this, "object"), o = R(this, "doLength"), a = R(this, "message"), i = a ? a + ": " : "", s = R(this, "ssfi"), l = Q(n).toLowerCase(), u = Q(e).toLowerCase(), d = Q(t).toLowerCase(), f, c = !0, v = u === "date" && d === "date" ? e.toISOString() + ".." + t.toISOString() : e + ".." + t;
|
|
@@ -2204,7 +2204,7 @@ function ts(e, t) {
|
|
|
2204
2204
|
n
|
|
2205
2205
|
)) : s;
|
|
2206
2206
|
}
|
|
2207
|
-
let i =
|
|
2207
|
+
let i = Ma(e);
|
|
2208
2208
|
i == null && (i = "an unnamed constructor"), this.assert(
|
|
2209
2209
|
a,
|
|
2210
2210
|
"expected #{this} to be an instance of " + i,
|
|
@@ -2245,7 +2245,7 @@ function rs(e, t, r) {
|
|
|
2245
2245
|
let u = R(this, "deep"), d = R(this, "negate"), f = n ? Li(i, e) : null, c = n ? f.value : i[e], v = u ? R(this, "eql") : (T, p) => T === p, m = "";
|
|
2246
2246
|
u && (m += "deep "), o && (m += "own "), n && (m += "nested "), m += "property ";
|
|
2247
2247
|
let g;
|
|
2248
|
-
o ? g = Object.prototype.hasOwnProperty.call(i, e) : n ? g = f.exists : g =
|
|
2248
|
+
o ? g = Object.prototype.hasOwnProperty.call(i, e) : n ? g = f.exists : g = Sa(i, e), (!d || arguments.length === 1) && this.assert(
|
|
2249
2249
|
g,
|
|
2250
2250
|
"expected #{this} to have " + m + H(e),
|
|
2251
2251
|
"expected #{this} to not have " + m + H(e)
|
|
@@ -2388,7 +2388,7 @@ function ls(e) {
|
|
|
2388
2388
|
x(ls, "assertKeys");
|
|
2389
2389
|
b.addMethod("keys", ls);
|
|
2390
2390
|
b.addMethod("key", ls);
|
|
2391
|
-
function
|
|
2391
|
+
function ja(e, t, r) {
|
|
2392
2392
|
r && R(this, "message", r);
|
|
2393
2393
|
let n = R(this, "object"), o = R(this, "ssfi"), a = R(this, "message"), i = R(this, "negate") || !1;
|
|
2394
2394
|
new b(n, a, o, !0).is.a("function"), (ma(e) || typeof e == "string") && (t = e, e = null);
|
|
@@ -2459,10 +2459,10 @@ function Da(e, t, r) {
|
|
|
2459
2459
|
s instanceof Error ? s.toString() : s && fe.getConstructorName(s)
|
|
2460
2460
|
), R(this, "object", s);
|
|
2461
2461
|
}
|
|
2462
|
-
x(
|
|
2463
|
-
b.addMethod("throw",
|
|
2464
|
-
b.addMethod("throws",
|
|
2465
|
-
b.addMethod("Throw",
|
|
2462
|
+
x(ja, "assertThrows");
|
|
2463
|
+
b.addMethod("throw", ja);
|
|
2464
|
+
b.addMethod("throws", ja);
|
|
2465
|
+
b.addMethod("Throw", ja);
|
|
2466
2466
|
function us(e, t) {
|
|
2467
2467
|
t && R(this, "message", t);
|
|
2468
2468
|
let r = R(this, "object"), n = R(this, "itself"), o = typeof r == "function" && !n ? r.prototype[e] : r[e];
|
|
@@ -3526,7 +3526,7 @@ Ho && !document.getElementById("loader-spin-keyframes") && (Ho.id = "loader-spin
|
|
|
3526
3526
|
100% { transform: rotate(360deg); }
|
|
3527
3527
|
}
|
|
3528
3528
|
`, document.head.appendChild(Ho));
|
|
3529
|
-
const
|
|
3529
|
+
const $a = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ D.jsx(
|
|
3530
3530
|
"svg",
|
|
3531
3531
|
{
|
|
3532
3532
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3542,7 +3542,7 @@ const ja = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ D.j
|
|
|
3542
3542
|
"data-testid": r,
|
|
3543
3543
|
children: t
|
|
3544
3544
|
}
|
|
3545
|
-
), ch = () => /* @__PURE__ */ D.jsx(
|
|
3545
|
+
), ch = () => /* @__PURE__ */ D.jsx($a, { className: "lucide-play-icon lucide-play", dataTestId: "play-icon", children: /* @__PURE__ */ D.jsx("path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" }) }), _f = ({ id: e, name: t, skip: r, only: n }) => /* @__PURE__ */ D.jsxs(D.Fragment, { children: [
|
|
3546
3546
|
t,
|
|
3547
3547
|
" ",
|
|
3548
3548
|
n && /* @__PURE__ */ D.jsxs(
|
|
@@ -3753,14 +3753,14 @@ const dh = (e) => {
|
|
|
3753
3753
|
id: r,
|
|
3754
3754
|
runTest: n
|
|
3755
3755
|
}) => {
|
|
3756
|
-
const o = _o(null), a = _o(e.status), i = _o(e.logs?.length || 0), s =
|
|
3756
|
+
const o = _o(null), a = _o(e.status), i = _o(e.logs?.length || 0), s = za(() => bh(e), [e.status]), l = typeof window < "u" && sessionStorage.getItem("twd-last-run-test-name") === e.name, u = za(
|
|
3757
3757
|
() => ({
|
|
3758
3758
|
...It.container,
|
|
3759
3759
|
marginLeft: `calc(${t} * var(--twd-spacing-sm))`,
|
|
3760
3760
|
...s.container || {}
|
|
3761
3761
|
}),
|
|
3762
3762
|
[t, s]
|
|
3763
|
-
), d =
|
|
3763
|
+
), d = za(
|
|
3764
3764
|
() => ({
|
|
3765
3765
|
...It.item,
|
|
3766
3766
|
...s.item,
|
|
@@ -3828,7 +3828,7 @@ const dh = (e) => {
|
|
|
3828
3828
|
},
|
|
3829
3829
|
e.name
|
|
3830
3830
|
);
|
|
3831
|
-
}, gh = () => /* @__PURE__ */ D.jsx(
|
|
3831
|
+
}, gh = () => /* @__PURE__ */ D.jsx($a, { className: "lucide-chevron-down-icon lucide-chevron-down", dataTestId: "chevron-down-icon", children: /* @__PURE__ */ D.jsx("path", { d: "m6 9 6 6 6-6" }) }), yh = () => /* @__PURE__ */ D.jsx($a, { className: "lucide-chevron-right-icon lucide-chevron-right", dataTestId: "chevron-right-icon", children: /* @__PURE__ */ D.jsx("path", { d: "m9 18 6-6-6-6" }) }), wh = ({ tests: e, runTest: t }) => {
|
|
3832
3832
|
const [r, n] = ta({}), o = _o(null), a = _o(!1), i = (u) => n((d) => ({ ...d, [u]: !d[u] }));
|
|
3833
3833
|
qa(() => {
|
|
3834
3834
|
if (a.current) return;
|
|
@@ -3957,7 +3957,7 @@ const dh = (e) => {
|
|
|
3957
3957
|
r.style.marginRight = "0", r.style.marginLeft = "0";
|
|
3958
3958
|
};
|
|
3959
3959
|
}, [e, t]);
|
|
3960
|
-
}, Ch = () => /* @__PURE__ */ D.jsxs(
|
|
3960
|
+
}, Ch = () => /* @__PURE__ */ D.jsxs($a, { className: "lucide-wifi-pen-icon lucide-wifi-pen", dataTestId: "wifi-pen-icon", children: [
|
|
3961
3961
|
/* @__PURE__ */ D.jsx("path", { d: "M2 8.82a15 15 0 0 1 20 0" }),
|
|
3962
3962
|
/* @__PURE__ */ D.jsx("path", { d: "M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }),
|
|
3963
3963
|
/* @__PURE__ */ D.jsx("path", { d: "M5 12.859a10 10 0 0 1 10.5-2.222" }),
|
|
@@ -4166,7 +4166,15 @@ const dh = (e) => {
|
|
|
4166
4166
|
},
|
|
4167
4167
|
children: "Clear mocks"
|
|
4168
4168
|
}
|
|
4169
|
-
)
|
|
4169
|
+
),
|
|
4170
|
+
/* @__PURE__ */ D.jsxs("span", { style: {
|
|
4171
|
+
color: "var(--twd-text-secondary)",
|
|
4172
|
+
fontSize: "var(--twd-font-size-sm)",
|
|
4173
|
+
alignSelf: "center"
|
|
4174
|
+
}, children: [
|
|
4175
|
+
"v",
|
|
4176
|
+
_a
|
|
4177
|
+
] })
|
|
4170
4178
|
] }),
|
|
4171
4179
|
/* @__PURE__ */ D.jsx(
|
|
4172
4180
|
"button",
|
|
@@ -4606,7 +4614,7 @@ function Fo(e) {
|
|
|
4606
4614
|
e.ownerDocument.body
|
|
4607
4615
|
) : e.body : t;
|
|
4608
4616
|
}
|
|
4609
|
-
function
|
|
4617
|
+
function Ka(e) {
|
|
4610
4618
|
var t;
|
|
4611
4619
|
return (t = Fo(e)) !== null && t !== void 0 ? t : (
|
|
4612
4620
|
/* istanbul ignore next */
|
|
@@ -4777,7 +4785,7 @@ function Bf() {
|
|
|
4777
4785
|
})(ra)), ra.exports;
|
|
4778
4786
|
}
|
|
4779
4787
|
var ot = {}, Ws;
|
|
4780
|
-
function
|
|
4788
|
+
function Ba() {
|
|
4781
4789
|
if (Ws) return ot;
|
|
4782
4790
|
Ws = 1, Object.defineProperty(ot, "__esModule", {
|
|
4783
4791
|
value: !0
|
|
@@ -4857,7 +4865,7 @@ function Jh() {
|
|
|
4857
4865
|
Gs = 1, Object.defineProperty(Se, "__esModule", {
|
|
4858
4866
|
value: !0
|
|
4859
4867
|
}), Se.test = Se.serialize = Se.default = void 0;
|
|
4860
|
-
var e =
|
|
4868
|
+
var e = Ba(), t = (function() {
|
|
4861
4869
|
return typeof globalThis < "u" ? globalThis : typeof t < "u" ? t : typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
|
|
4862
4870
|
})(), r = t["jest-symbol-do-not-touch"] || t.Symbol;
|
|
4863
4871
|
const n = typeof r == "function" && r.for ? r.for("jest.asymmetricMatcher") : 1267621, o = " ", a = (u, d, f, c, v, m) => {
|
|
@@ -4887,15 +4895,15 @@ function Jh() {
|
|
|
4887
4895
|
};
|
|
4888
4896
|
return Se.default = l, Se;
|
|
4889
4897
|
}
|
|
4890
|
-
var Ae = {},
|
|
4898
|
+
var Ae = {}, Ya, Ks;
|
|
4891
4899
|
function Qh() {
|
|
4892
|
-
return Ks || (Ks = 1,
|
|
4900
|
+
return Ks || (Ks = 1, Ya = ({ onlyFirst: e = !1 } = {}) => {
|
|
4893
4901
|
const t = [
|
|
4894
4902
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
4895
4903
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
4896
4904
|
].join("|");
|
|
4897
4905
|
return new RegExp(t, e ? void 0 : "g");
|
|
4898
|
-
}),
|
|
4906
|
+
}), Ya;
|
|
4899
4907
|
}
|
|
4900
4908
|
var Ys;
|
|
4901
4909
|
function Zh() {
|
|
@@ -4967,7 +4975,7 @@ function eb() {
|
|
|
4967
4975
|
Xs = 1, Object.defineProperty(Me, "__esModule", {
|
|
4968
4976
|
value: !0
|
|
4969
4977
|
}), Me.test = Me.serialize = Me.default = void 0;
|
|
4970
|
-
var e =
|
|
4978
|
+
var e = Ba();
|
|
4971
4979
|
const t = " ", r = ["DOMStringMap", "NamedNodeMap"], n = /^(HTML\w*Collection|NodeList)$/, o = (d) => r.indexOf(d) !== -1 || n.test(d), a = (d) => d && d.constructor && !!d.constructor.name && o(d.constructor.name);
|
|
4972
4980
|
Me.test = a;
|
|
4973
4981
|
const i = (d) => d.constructor.name === "NamedNodeMap", s = (d, f, c, v, m, g) => {
|
|
@@ -5123,7 +5131,7 @@ function nb() {
|
|
|
5123
5131
|
el = 1, Object.defineProperty(Ie, "__esModule", {
|
|
5124
5132
|
value: !0
|
|
5125
5133
|
}), Ie.test = Ie.serialize = Ie.default = void 0;
|
|
5126
|
-
var e =
|
|
5134
|
+
var e = Ba();
|
|
5127
5135
|
const t = "@@__IMMUTABLE_ITERABLE__@@", r = "@@__IMMUTABLE_LIST__@@", n = "@@__IMMUTABLE_KEYED__@@", o = "@@__IMMUTABLE_MAP__@@", a = "@@__IMMUTABLE_ORDERED__@@", i = "@@__IMMUTABLE_RECORD__@@", s = "@@__IMMUTABLE_SEQ__@@", l = "@@__IMMUTABLE_SET__@@", u = "@@__IMMUTABLE_STACK__@@", d = (w) => "Immutable." + w, f = (w) => "[" + w + "]", c = " ", v = "…", m = (w, E, M, N, j, $, A) => ++N > E.maxDepth ? f(d(A)) : d(A) + c + "{" + (0, e.printIteratorEntries)(
|
|
5128
5136
|
w.entries(),
|
|
5129
5137
|
E,
|
|
@@ -5533,7 +5541,7 @@ function ub() {
|
|
|
5533
5541
|
il = 1, Object.defineProperty(xe, "__esModule", {
|
|
5534
5542
|
value: !0
|
|
5535
5543
|
}), xe.default = xe.DEFAULT_OPTIONS = void 0, xe.format = we, xe.plugins = void 0;
|
|
5536
|
-
var e = u(Bf()), t =
|
|
5544
|
+
var e = u(Bf()), t = Ba(), r = u(
|
|
5537
5545
|
Jh()
|
|
5538
5546
|
), n = u(Zh()), o = u(eb()), a = u(rb()), i = u(nb()), s = u(sb()), l = u(
|
|
5539
5547
|
lb()
|
|
@@ -12150,9 +12158,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
12150
12158
|
}, T = (0, o.default)(g, g.entries());
|
|
12151
12159
|
return jt.default = T, jt;
|
|
12152
12160
|
}
|
|
12153
|
-
var yo = {},
|
|
12161
|
+
var yo = {}, Xa = {}, Yc;
|
|
12154
12162
|
function jy() {
|
|
12155
|
-
if (Yc) return
|
|
12163
|
+
if (Yc) return Xa;
|
|
12156
12164
|
Yc = 1;
|
|
12157
12165
|
var e = Object.prototype.hasOwnProperty;
|
|
12158
12166
|
function t(r, n) {
|
|
@@ -12175,7 +12183,7 @@ function jy() {
|
|
|
12175
12183
|
}
|
|
12176
12184
|
return r !== r && n !== n;
|
|
12177
12185
|
}
|
|
12178
|
-
return
|
|
12186
|
+
return Xa.dequal = t, Xa;
|
|
12179
12187
|
}
|
|
12180
12188
|
var Xc;
|
|
12181
12189
|
function $y() {
|
|
@@ -12485,7 +12493,7 @@ function Ly() {
|
|
|
12485
12493
|
var d = o.default;
|
|
12486
12494
|
return de.roleElements = d, de;
|
|
12487
12495
|
}
|
|
12488
|
-
var he = Ly(),
|
|
12496
|
+
var he = Ly(), Ja = { exports: {} }, Zc;
|
|
12489
12497
|
function Fy() {
|
|
12490
12498
|
return Zc || (Zc = 1, (function(e) {
|
|
12491
12499
|
var t = (function() {
|
|
@@ -12681,7 +12689,7 @@ function Fy() {
|
|
|
12681
12689
|
e != null ? e.exports = t : typeof angular < "u" && angular != null && angular.module("LZString", []).factory("LZString", function() {
|
|
12682
12690
|
return t;
|
|
12683
12691
|
});
|
|
12684
|
-
})(
|
|
12692
|
+
})(Ja)), Ja.exports;
|
|
12685
12693
|
}
|
|
12686
12694
|
var Uy = Fy();
|
|
12687
12695
|
const zy = /* @__PURE__ */ ih(Uy);
|
|
@@ -12728,7 +12736,7 @@ function Zy(e) {
|
|
|
12728
12736
|
function ew(e) {
|
|
12729
12737
|
return e.nodeType === Qf;
|
|
12730
12738
|
}
|
|
12731
|
-
function
|
|
12739
|
+
function Qa(e) {
|
|
12732
12740
|
return e.nodeType === Zf;
|
|
12733
12741
|
}
|
|
12734
12742
|
function tw(e) {
|
|
@@ -12742,8 +12750,8 @@ function tw(e) {
|
|
|
12742
12750
|
return Xf(t.data, r);
|
|
12743
12751
|
if (ew(t))
|
|
12744
12752
|
return Gy(t.data, r);
|
|
12745
|
-
const s =
|
|
12746
|
-
return ++o > r.maxDepth ? Yy(s, r) : Ky(s, Vy(
|
|
12753
|
+
const s = Qa(t) ? "DocumentFragment" : t.tagName.toLowerCase();
|
|
12754
|
+
return ++o > r.maxDepth ? Yy(s, r) : Ky(s, Vy(Qa(t) ? [] : Array.from(t.attributes).map((l) => l.name).sort(), Qa(t) ? {} : Array.from(t.attributes).reduce((l, u) => (l[u.name] = u.value, l), {}), r, n + r.indent, o, a, i), Wy(Array.prototype.slice.call(t.childNodes || t.children).filter(e), r, n + r.indent, o, a, i), r, n);
|
|
12747
12755
|
}
|
|
12748
12756
|
};
|
|
12749
12757
|
}
|
|
@@ -12782,7 +12790,7 @@ function nw() {
|
|
|
12782
12790
|
return rw(t);
|
|
12783
12791
|
}
|
|
12784
12792
|
const rp = 3;
|
|
12785
|
-
function
|
|
12793
|
+
function Za() {
|
|
12786
12794
|
return typeof jest < "u" && jest !== null ? (
|
|
12787
12795
|
// legacy timers
|
|
12788
12796
|
setTimeout._isMockFunction === !0 || // modern timers
|
|
@@ -12904,7 +12912,7 @@ const dw = ["button", "meter", "output", "progress", "select", "textarea", "inpu
|
|
|
12904
12912
|
function op(e) {
|
|
12905
12913
|
return dw.includes(e.nodeName.toLowerCase()) ? "" : e.nodeType === rp ? e.textContent : Array.from(e.childNodes).map((t) => op(t)).join("");
|
|
12906
12914
|
}
|
|
12907
|
-
function
|
|
12915
|
+
function yi(e) {
|
|
12908
12916
|
let t;
|
|
12909
12917
|
return e.tagName.toLowerCase() === "label" ? t = op(e) : t = e.value || e.textContent, t;
|
|
12910
12918
|
}
|
|
@@ -12928,14 +12936,14 @@ function ip(e, t, r) {
|
|
|
12928
12936
|
return a.length ? a.map((i) => {
|
|
12929
12937
|
const s = e.querySelector('[id="' + i + '"]');
|
|
12930
12938
|
return s ? {
|
|
12931
|
-
content:
|
|
12939
|
+
content: yi(s),
|
|
12932
12940
|
formControl: null
|
|
12933
12941
|
} : {
|
|
12934
12942
|
content: "",
|
|
12935
12943
|
formControl: null
|
|
12936
12944
|
};
|
|
12937
12945
|
}) : Array.from(ap(t)).map((i) => {
|
|
12938
|
-
const s =
|
|
12946
|
+
const s = yi(i), u = Array.from(i.querySelectorAll("button, input, meter, output, progress, select, textarea")).filter((d) => d.matches(n))[0];
|
|
12939
12947
|
return {
|
|
12940
12948
|
content: s,
|
|
12941
12949
|
formControl: u
|
|
@@ -12992,7 +13000,7 @@ function up(e, t) {
|
|
|
12992
13000
|
const r = e.test(t);
|
|
12993
13001
|
return e.global && e.lastIndex !== 0 && (console.warn("To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp."), e.lastIndex = 0), r;
|
|
12994
13002
|
}
|
|
12995
|
-
function
|
|
13003
|
+
function La(e) {
|
|
12996
13004
|
return e.matches("input[type=submit], input[type=button], input[type=reset]") ? e.value : Array.from(e.childNodes).filter((t) => t.nodeType === rp && !!t.textContent).map((t) => t.textContent).join("");
|
|
12997
13005
|
}
|
|
12998
13006
|
const pw = mw(he.elementRoles);
|
|
@@ -13219,7 +13227,7 @@ function We(e, t, r, n) {
|
|
|
13219
13227
|
function Ge(e, t, r) {
|
|
13220
13228
|
return r && !0;
|
|
13221
13229
|
}
|
|
13222
|
-
function
|
|
13230
|
+
function wi(e, t, r) {
|
|
13223
13231
|
var n, o;
|
|
13224
13232
|
if (t === void 0 && (t = "get"), e.matches(K().defaultIgnore))
|
|
13225
13233
|
return;
|
|
@@ -13241,7 +13249,7 @@ function yi(e, t, r) {
|
|
|
13241
13249
|
return We("PlaceholderText", e, s, {
|
|
13242
13250
|
variant: t
|
|
13243
13251
|
});
|
|
13244
|
-
const l = td(
|
|
13252
|
+
const l = td(La(e));
|
|
13245
13253
|
if (Ge("Text", r, l))
|
|
13246
13254
|
return We("Text", e, l, {
|
|
13247
13255
|
variant: t
|
|
@@ -13290,13 +13298,13 @@ function Sw(e, t) {
|
|
|
13290
13298
|
throw new TypeError("Received `callback` arg must be a function");
|
|
13291
13299
|
return new Promise(async (u, d) => {
|
|
13292
13300
|
let f, c, v, m = !1, g = "idle";
|
|
13293
|
-
const T = setTimeout(P, n), p =
|
|
13301
|
+
const T = setTimeout(P, n), p = Za();
|
|
13294
13302
|
if (p) {
|
|
13295
13303
|
const {
|
|
13296
13304
|
unstable_advanceTimersWrapper: y
|
|
13297
13305
|
} = K();
|
|
13298
13306
|
for (S(); !m; ) {
|
|
13299
|
-
if (!
|
|
13307
|
+
if (!Za()) {
|
|
13300
13308
|
const w = new Error("Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");
|
|
13301
13309
|
o || Xo(w, a), d(w);
|
|
13302
13310
|
return;
|
|
@@ -13324,7 +13332,7 @@ function Sw(e, t) {
|
|
|
13324
13332
|
m = !0, clearTimeout(T), p || (clearInterval(c), v.disconnect()), y ? d(y) : u(w);
|
|
13325
13333
|
}
|
|
13326
13334
|
function _() {
|
|
13327
|
-
if (
|
|
13335
|
+
if (Za()) {
|
|
13328
13336
|
const y = new Error("Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");
|
|
13329
13337
|
return o || Xo(y, a), d(y);
|
|
13330
13338
|
} else
|
|
@@ -13362,7 +13370,7 @@ function dp(e, t) {
|
|
|
13362
13370
|
function Mw(e, t) {
|
|
13363
13371
|
return dp(e + "\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).", t);
|
|
13364
13372
|
}
|
|
13365
|
-
function
|
|
13373
|
+
function Fa(e, t, r, n) {
|
|
13366
13374
|
let {
|
|
13367
13375
|
exact: o = !0,
|
|
13368
13376
|
collapseWhitespace: a,
|
|
@@ -13422,7 +13430,7 @@ const gt = (e, t, r) => function(n) {
|
|
|
13422
13430
|
suggest: l = K().throwSuggestions
|
|
13423
13431
|
} = {}] = a.slice(-1);
|
|
13424
13432
|
if (s && l) {
|
|
13425
|
-
const u =
|
|
13433
|
+
const u = wi(s, r);
|
|
13426
13434
|
if (u && !t.endsWith(u.queryName))
|
|
13427
13435
|
throw fp(u.toString(), n);
|
|
13428
13436
|
}
|
|
@@ -13436,13 +13444,13 @@ const gt = (e, t, r) => function(n) {
|
|
|
13436
13444
|
if (s.length && l) {
|
|
13437
13445
|
const u = [...new Set(s.map((d) => {
|
|
13438
13446
|
var f;
|
|
13439
|
-
return (f =
|
|
13447
|
+
return (f = wi(d, r)) == null ? void 0 : f.toString();
|
|
13440
13448
|
}))];
|
|
13441
13449
|
if (
|
|
13442
13450
|
// only want to suggest if all the els have the same suggestion.
|
|
13443
13451
|
u.length === 1 && !t.endsWith(
|
|
13444
13452
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Can this be null at runtime?
|
|
13445
|
-
|
|
13453
|
+
wi(s[0], r).queryName
|
|
13446
13454
|
)
|
|
13447
13455
|
)
|
|
13448
13456
|
throw fp(u[0], n);
|
|
@@ -13456,7 +13464,7 @@ function bt(e, t, r) {
|
|
|
13456
13464
|
function Iw(e) {
|
|
13457
13465
|
return Array.from(e.querySelectorAll("label,input")).map((t) => ({
|
|
13458
13466
|
node: t,
|
|
13459
|
-
textToMatch:
|
|
13467
|
+
textToMatch: yi(t)
|
|
13460
13468
|
})).filter((t) => {
|
|
13461
13469
|
let {
|
|
13462
13470
|
textToMatch: r
|
|
@@ -13514,7 +13522,7 @@ const Nw = function(e, t, r) {
|
|
|
13514
13522
|
const p = [...m];
|
|
13515
13523
|
p.splice(T, 1), p.length > 1 && l(p.join(" "), c, t, u) && f.push(c);
|
|
13516
13524
|
}), f;
|
|
13517
|
-
}, []).concat(
|
|
13525
|
+
}, []).concat(Fa("aria-label", e, t, {
|
|
13518
13526
|
exact: o,
|
|
13519
13527
|
normalizer: u
|
|
13520
13528
|
}));
|
|
@@ -13542,11 +13550,11 @@ function kw(e, t) {
|
|
|
13542
13550
|
const n = e.querySelector('[id="' + r + '"]');
|
|
13543
13551
|
return n ? n.tagName.toLowerCase() : null;
|
|
13544
13552
|
}
|
|
13545
|
-
const pp = (e, t) => "Found multiple elements with the text of: " + t, Dw = gt(wa(Io, pp), Io.name, "query"), mp = wa(pt, pp), jw = Ra(ve(pt, pt.name, "findAll")), $w = Ra(gt(mp, pt.name, "find")), Bw = ve(pt, pt.name, "getAll"), Lw = gt(mp, pt.name, "get"), Fw = ve(Io, Io.name, "queryAll"),
|
|
13553
|
+
const pp = (e, t) => "Found multiple elements with the text of: " + t, Dw = gt(wa(Io, pp), Io.name, "query"), mp = wa(pt, pp), jw = Ra(ve(pt, pt.name, "findAll")), $w = Ra(gt(mp, pt.name, "find")), Bw = ve(pt, pt.name, "getAll"), Lw = gt(mp, pt.name, "get"), Fw = ve(Io, Io.name, "queryAll"), Ri = function() {
|
|
13546
13554
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
13547
13555
|
t[r] = arguments[r];
|
|
13548
|
-
return Ue(t[0]),
|
|
13549
|
-
}, Uw = (e, t) => "Found multiple elements with the placeholder text of: " + t, zw = (e, t) => "Unable to find an element with the placeholder text of: " + t, Vw = ve(
|
|
13556
|
+
return Ue(t[0]), Fa("placeholder", ...t);
|
|
13557
|
+
}, Uw = (e, t) => "Found multiple elements with the placeholder text of: " + t, zw = (e, t) => "Unable to find an element with the placeholder text of: " + t, Vw = ve(Ri, Ri.name, "queryAll"), [Hw, Ww, Gw, Kw, Yw] = bt(Ri, Uw, zw), Ei = function(e, t, r) {
|
|
13550
13558
|
let {
|
|
13551
13559
|
selector: n = "*",
|
|
13552
13560
|
exact: o = !0,
|
|
@@ -13562,7 +13570,7 @@ const pp = (e, t) => "Found multiple elements with the text of: " + t, Dw = gt(w
|
|
|
13562
13570
|
normalizer: l
|
|
13563
13571
|
});
|
|
13564
13572
|
let f = [];
|
|
13565
|
-
return typeof e.matches == "function" && e.matches(n) && (f = [e]), [...f, ...Array.from(e.querySelectorAll(n))].filter((c) => !s || !c.matches(s)).filter((c) => u(
|
|
13573
|
+
return typeof e.matches == "function" && e.matches(n) && (f = [e]), [...f, ...Array.from(e.querySelectorAll(n))].filter((c) => !s || !c.matches(s)).filter((c) => u(La(c), c, t, d));
|
|
13566
13574
|
}, Xw = (e, t) => "Found multiple elements with the text: " + t, Jw = function(e, t, r) {
|
|
13567
13575
|
r === void 0 && (r = {});
|
|
13568
13576
|
const {
|
|
@@ -13576,7 +13584,7 @@ const pp = (e, t) => "Found multiple elements with the text of: " + t, Dw = gt(w
|
|
|
13576
13584
|
normalizer: a
|
|
13577
13585
|
})(t.toString()), u = l !== t.toString(), d = (i ?? "*") !== "*";
|
|
13578
13586
|
return "Unable to find an element with the text: " + (u ? l + " (normalized from '" + t + "')" : t) + (d ? ", which matches selector '" + i + "'" : "") + ". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.";
|
|
13579
|
-
}, Qw = ve(
|
|
13587
|
+
}, Qw = ve(Ei, Ei.name, "queryAll"), [Zw, eR, tR, rR, nR] = bt(Ei, Xw, Jw), xi = function(e, t, r) {
|
|
13580
13588
|
let {
|
|
13581
13589
|
exact: n = !0,
|
|
13582
13590
|
collapseWhitespace: o,
|
|
@@ -13589,13 +13597,13 @@ const pp = (e, t) => "Found multiple elements with the text of: " + t, Dw = gt(w
|
|
|
13589
13597
|
trim: a,
|
|
13590
13598
|
normalizer: i
|
|
13591
13599
|
});
|
|
13592
|
-
return Array.from(e.querySelectorAll("input,textarea,select")).filter((u) => u.tagName === "SELECT" ? Array.from(u.options).filter((f) => f.selected).some((f) => s(
|
|
13593
|
-
}, oR = (e, t) => "Found multiple elements with the display value: " + t + ".", aR = (e, t) => "Unable to find an element with the display value: " + t + ".", iR = ve(
|
|
13594
|
-
return r === void 0 && (r = {}), Ue(e),
|
|
13595
|
-
}, pR = (e, t) => "Found multiple elements with the alt text: " + t, mR = (e, t) => "Unable to find an element with the alt text: " + t, hR = ve(
|
|
13600
|
+
return Array.from(e.querySelectorAll("input,textarea,select")).filter((u) => u.tagName === "SELECT" ? Array.from(u.options).filter((f) => f.selected).some((f) => s(La(f), f, t, l)) : s(u.value, u, t, l));
|
|
13601
|
+
}, oR = (e, t) => "Found multiple elements with the display value: " + t + ".", aR = (e, t) => "Unable to find an element with the display value: " + t + ".", iR = ve(xi, xi.name, "queryAll"), [sR, lR, uR, cR, dR] = bt(xi, oR, aR), fR = /^(img|input|area|.+-.+)$/i, Ci = function(e, t, r) {
|
|
13602
|
+
return r === void 0 && (r = {}), Ue(e), Fa("alt", e, t, r).filter((n) => fR.test(n.tagName));
|
|
13603
|
+
}, pR = (e, t) => "Found multiple elements with the alt text: " + t, mR = (e, t) => "Unable to find an element with the alt text: " + t, hR = ve(Ci, Ci.name, "queryAll"), [bR, vR, gR, yR, wR] = bt(Ci, pR, mR), RR = (e) => {
|
|
13596
13604
|
var t;
|
|
13597
13605
|
return e.tagName.toLowerCase() === "title" && ((t = e.parentElement) == null ? void 0 : t.tagName.toLowerCase()) === "svg";
|
|
13598
|
-
},
|
|
13606
|
+
}, qi = function(e, t, r) {
|
|
13599
13607
|
let {
|
|
13600
13608
|
exact: n = !0,
|
|
13601
13609
|
collapseWhitespace: o,
|
|
@@ -13608,8 +13616,8 @@ const pp = (e, t) => "Found multiple elements with the text of: " + t, Dw = gt(w
|
|
|
13608
13616
|
trim: a,
|
|
13609
13617
|
normalizer: i
|
|
13610
13618
|
});
|
|
13611
|
-
return Array.from(e.querySelectorAll("[title], svg > title")).filter((u) => s(u.getAttribute("title"), u, t, l) || RR(u) && s(
|
|
13612
|
-
}, ER = (e, t) => "Found multiple elements with the title: " + t + ".", xR = (e, t) => "Unable to find an element with the title: " + t + ".", CR = ve(
|
|
13619
|
+
return Array.from(e.querySelectorAll("[title], svg > title")).filter((u) => s(u.getAttribute("title"), u, t, l) || RR(u) && s(La(u), u, t, l));
|
|
13620
|
+
}, ER = (e, t) => "Found multiple elements with the title: " + t + ".", xR = (e, t) => "Unable to find an element with the title: " + t + ".", CR = ve(qi, qi.name, "queryAll"), [qR, _R, PR, TR, SR] = bt(qi, ER, xR), _i = function(e, t, r) {
|
|
13613
13621
|
let {
|
|
13614
13622
|
hidden: n = K().defaultHidden,
|
|
13615
13623
|
name: o,
|
|
@@ -13778,12 +13786,12 @@ Here are the ` + (n === !1 ? "accessible" : "available") + ` roles:
|
|
|
13778
13786
|
Unable to find an ` + (n === !1 ? "accessible " : "") + 'element with the role "' + t + '"' + l + u + `
|
|
13779
13787
|
|
|
13780
13788
|
` + s).trim();
|
|
13781
|
-
}, IR = ve(
|
|
13789
|
+
}, IR = ve(_i, _i.name, "queryAll"), [NR, kR, DR, jR, $R] = bt(_i, MR, OR), Ts = () => K().testIdAttribute, Pi = function() {
|
|
13782
13790
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
13783
13791
|
t[r] = arguments[r];
|
|
13784
|
-
return Ue(t[0]),
|
|
13785
|
-
}, BR = (e, t) => "Found multiple elements by: [" + Ts() + '="' + t + '"]', LR = (e, t) => "Unable to find an element by: [" + Ts() + '="' + t + '"]', FR = ve(
|
|
13786
|
-
var
|
|
13792
|
+
return Ue(t[0]), Fa(Ts(), ...t);
|
|
13793
|
+
}, BR = (e, t) => "Found multiple elements by: [" + Ts() + '="' + t + '"]', LR = (e, t) => "Unable to find an element by: [" + Ts() + '="' + t + '"]', FR = ve(Pi, Pi.name, "queryAll"), [UR, zR, VR, HR, WR] = bt(Pi, BR, LR);
|
|
13794
|
+
var Ti = /* @__PURE__ */ Object.freeze({
|
|
13787
13795
|
__proto__: null,
|
|
13788
13796
|
queryAllByLabelText: Fw,
|
|
13789
13797
|
queryByLabelText: Dw,
|
|
@@ -13835,7 +13843,7 @@ var Pi = /* @__PURE__ */ Object.freeze({
|
|
|
13835
13843
|
findByTestId: WR
|
|
13836
13844
|
});
|
|
13837
13845
|
function bp(e, t, r) {
|
|
13838
|
-
return t === void 0 && (t =
|
|
13846
|
+
return t === void 0 && (t = Ti), r === void 0 && (r = {}), Object.keys(t).reduce((n, o) => {
|
|
13839
13847
|
const a = t[o];
|
|
13840
13848
|
return n[o] = a.bind(null, e), n;
|
|
13841
13849
|
}, r);
|
|
@@ -14579,7 +14587,7 @@ const JR = (e, t, r) => Array.isArray(e) ? e.forEach((n) => ed(n, t, r)) : ed(e,
|
|
|
14579
14587
|
}, od = {
|
|
14580
14588
|
debug: JR,
|
|
14581
14589
|
logTestingPlaygroundURL: QR
|
|
14582
|
-
},
|
|
14590
|
+
}, Ua = typeof document < "u" && document.body ? bp(document.body, Ti, od) : Object.keys(Ti).reduce((e, t) => (e[t] = () => {
|
|
14583
14591
|
throw new TypeError("For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error");
|
|
14584
14592
|
}, e), od);
|
|
14585
14593
|
function Ct(e, t) {
|
|
@@ -15479,18 +15487,18 @@ const OE = {
|
|
|
15479
15487
|
],
|
|
15480
15488
|
MouseEvent: [
|
|
15481
15489
|
Ro,
|
|
15482
|
-
|
|
15490
|
+
ei,
|
|
15483
15491
|
dd
|
|
15484
15492
|
],
|
|
15485
15493
|
PointerEvent: [
|
|
15486
15494
|
Ro,
|
|
15487
|
-
|
|
15495
|
+
ei,
|
|
15488
15496
|
dd,
|
|
15489
15497
|
$E
|
|
15490
15498
|
],
|
|
15491
15499
|
KeyboardEvent: [
|
|
15492
15500
|
Ro,
|
|
15493
|
-
|
|
15501
|
+
ei,
|
|
15494
15502
|
jE
|
|
15495
15503
|
]
|
|
15496
15504
|
};
|
|
@@ -15594,7 +15602,7 @@ function Ro(e, { view: t, detail: r }) {
|
|
|
15594
15602
|
detail: te(r ?? 0)
|
|
15595
15603
|
});
|
|
15596
15604
|
}
|
|
15597
|
-
function
|
|
15605
|
+
function ei(e, { altKey: t, ctrlKey: r, metaKey: n, shiftKey: o, modifierAltGraph: a, modifierCapsLock: i, modifierFn: s, modifierFnLock: l, modifierNumLock: u, modifierScrollLock: d, modifierSymbol: f, modifierSymbolLock: c }) {
|
|
15598
15606
|
tt(e, {
|
|
15599
15607
|
altKey: !!t,
|
|
15600
15608
|
ctrlKey: !!r,
|
|
@@ -15745,16 +15753,16 @@ function pd(e) {
|
|
|
15745
15753
|
const t = Fo(e);
|
|
15746
15754
|
return t?.tagName === "BODY" ? null : t;
|
|
15747
15755
|
}
|
|
15748
|
-
const
|
|
15756
|
+
const ti = /* @__PURE__ */ Symbol("Interceptor for programmatical calls");
|
|
15749
15757
|
function vt(e, t, r) {
|
|
15750
15758
|
const n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), o = Object.getOwnPropertyDescriptor(e, t), a = n?.set ? "set" : "value";
|
|
15751
|
-
if (typeof n?.[a] != "function" || n[a][
|
|
15759
|
+
if (typeof n?.[a] != "function" || n[a][ti])
|
|
15752
15760
|
throw new Error(`Element ${e.tagName} does not implement "${String(t)}".`);
|
|
15753
15761
|
function i(...s) {
|
|
15754
15762
|
const { applyNative: l = !1, realArgs: u, then: d } = r.call(this, ...s), f = (!l && o || n)[a];
|
|
15755
15763
|
a === "set" ? f.call(this, u) : f.call(this, ...u), d?.();
|
|
15756
15764
|
}
|
|
15757
|
-
i[
|
|
15765
|
+
i[ti] = ti, Object.defineProperty(e, t, {
|
|
15758
15766
|
...o ?? n,
|
|
15759
15767
|
[a]: i
|
|
15760
15768
|
});
|
|
@@ -15905,13 +15913,13 @@ class KE {
|
|
|
15905
15913
|
}
|
|
15906
15914
|
/** Press a key */
|
|
15907
15915
|
async keydown(t, r) {
|
|
15908
|
-
const n = String(r.key), o = String(r.code), a =
|
|
15916
|
+
const n = String(r.key), o = String(r.code), a = Ka(t.config.document);
|
|
15909
15917
|
this.setKeydownTarget(a), this.pressed.add(o, r), hd(n) && (this.modifiers[n] = !0);
|
|
15910
15918
|
const i = t.dispatchUIEvent(a, "keydown", {
|
|
15911
15919
|
key: n,
|
|
15912
15920
|
code: o
|
|
15913
15921
|
});
|
|
15914
|
-
bd(n) && !this.modifiers[n] && (this.modifiers[n] = !0, this.modifierLockStart[n] = !0), i && this.pressed.setUnprevented(o), i && this.hasKeyPress(n) && t.dispatchUIEvent(
|
|
15922
|
+
bd(n) && !this.modifiers[n] && (this.modifiers[n] = !0, this.modifierLockStart[n] = !0), i && this.pressed.setUnprevented(o), i && this.hasKeyPress(n) && t.dispatchUIEvent(Ka(t.config.document), "keypress", {
|
|
15915
15923
|
key: n,
|
|
15916
15924
|
code: o,
|
|
15917
15925
|
charCode: r.key === "Enter" ? 13 : String(r.key).charCodeAt(0)
|
|
@@ -15920,7 +15928,7 @@ class KE {
|
|
|
15920
15928
|
/** Release a key */
|
|
15921
15929
|
async keyup(t, r) {
|
|
15922
15930
|
const n = String(r.key), o = String(r.code), a = this.pressed.isUnprevented(o);
|
|
15923
|
-
this.pressed.delete(o), hd(n) && !this.pressed.values().find((i) => i.keyDef.key === n) && (this.modifiers[n] = !1), t.dispatchUIEvent(
|
|
15931
|
+
this.pressed.delete(o), hd(n) && !this.pressed.values().find((i) => i.keyDef.key === n) && (this.modifiers[n] = !1), t.dispatchUIEvent(Ka(t.config.document), "keyup", {
|
|
15924
15932
|
key: n,
|
|
15925
15933
|
code: o
|
|
15926
15934
|
}, !a), bd(n) && this.modifiers[n] && (this.modifierLockStart[n] ? this.modifierLockStart[n] = !1 : this.modifiers[n] = !1);
|
|
@@ -16190,7 +16198,7 @@ class Ap {
|
|
|
16190
16198
|
return t;
|
|
16191
16199
|
}
|
|
16192
16200
|
down(t) {
|
|
16193
|
-
const r =
|
|
16201
|
+
const r = Si(t.button);
|
|
16194
16202
|
if (r in this.pressed) {
|
|
16195
16203
|
this.pressed[r].push(t);
|
|
16196
16204
|
return;
|
|
@@ -16200,7 +16208,7 @@ class Ap {
|
|
|
16200
16208
|
], r;
|
|
16201
16209
|
}
|
|
16202
16210
|
up(t) {
|
|
16203
|
-
const r =
|
|
16211
|
+
const r = Si(t.button);
|
|
16204
16212
|
if (r in this.pressed && (this.pressed[r] = this.pressed[r].filter((n) => n.name !== t.name), this.pressed[r].length === 0))
|
|
16205
16213
|
return delete this.pressed[r], r;
|
|
16206
16214
|
}
|
|
@@ -16217,15 +16225,15 @@ const vd = {
|
|
|
16217
16225
|
forward: 4,
|
|
16218
16226
|
X2: 4
|
|
16219
16227
|
};
|
|
16220
|
-
function
|
|
16228
|
+
function Si(e = 0) {
|
|
16221
16229
|
return e in vd ? vd[e] : Number(e);
|
|
16222
16230
|
}
|
|
16223
16231
|
const gd = {
|
|
16224
16232
|
1: 2,
|
|
16225
16233
|
2: 1
|
|
16226
16234
|
};
|
|
16227
|
-
function
|
|
16228
|
-
return e =
|
|
16235
|
+
function Ai(e) {
|
|
16236
|
+
return e = Si(e), e in gd ? gd[e] : e;
|
|
16229
16237
|
}
|
|
16230
16238
|
function QE(e, t, r) {
|
|
16231
16239
|
return t in e ? Object.defineProperty(e, t, {
|
|
@@ -16268,7 +16276,7 @@ function So(e, t) {
|
|
|
16268
16276
|
n.slice(n.length - o)
|
|
16269
16277
|
];
|
|
16270
16278
|
}
|
|
16271
|
-
function
|
|
16279
|
+
function Mi({ target: e, node: t, offset: r }) {
|
|
16272
16280
|
return _e(e) ? {
|
|
16273
16281
|
node: e,
|
|
16274
16282
|
offset: r ?? Pe(e).length
|
|
@@ -16324,11 +16332,11 @@ function ex({ document: e, target: t, clickCount: r, node: n, offset: o }) {
|
|
|
16324
16332
|
end: l ?? i.length
|
|
16325
16333
|
};
|
|
16326
16334
|
{
|
|
16327
|
-
const { node: u, offset: d } =
|
|
16335
|
+
const { node: u, offset: d } = Mi({
|
|
16328
16336
|
target: t,
|
|
16329
16337
|
node: n,
|
|
16330
16338
|
offset: s
|
|
16331
|
-
}), { node: f, offset: c } =
|
|
16339
|
+
}), { node: f, offset: c } = Mi({
|
|
16332
16340
|
target: t,
|
|
16333
16341
|
node: n,
|
|
16334
16342
|
offset: l
|
|
@@ -16358,7 +16366,7 @@ function tx(e, t, r) {
|
|
|
16358
16366
|
];
|
|
16359
16367
|
}
|
|
16360
16368
|
function rx(e, { document: t, target: r, node: n, offset: o }) {
|
|
16361
|
-
const a =
|
|
16369
|
+
const a = Mi({
|
|
16362
16370
|
target: r,
|
|
16363
16371
|
node: n,
|
|
16364
16372
|
offset: o
|
|
@@ -16415,7 +16423,7 @@ class nx {
|
|
|
16415
16423
|
const a = this.getTarget(t);
|
|
16416
16424
|
this.buttonDownTarget[o] = a;
|
|
16417
16425
|
const i = this.getEventInit("mousedown", r.button), s = Le(a);
|
|
16418
|
-
!n && (s || t.dispatchUIEvent(a, "mousedown", i)) && (this.startSelecting(t, i.detail), Ze(a)), !s &&
|
|
16426
|
+
!n && (s || t.dispatchUIEvent(a, "mousedown", i)) && (this.startSelecting(t, i.detail), Ze(a)), !s && Ai(r.button) === 2 && t.dispatchUIEvent(a, "contextmenu", this.getEventInit("contextmenu", r.button));
|
|
16419
16427
|
}
|
|
16420
16428
|
up(t, r, n) {
|
|
16421
16429
|
const o = this.buttons.up(r);
|
|
@@ -16444,7 +16452,7 @@ class nx {
|
|
|
16444
16452
|
const n = {
|
|
16445
16453
|
...this.position.coords
|
|
16446
16454
|
};
|
|
16447
|
-
return n.button =
|
|
16455
|
+
return n.button = Ai(r), n.buttons = this.buttons.getButtons(), t === "mousedown" ? n.detail = this.clickCount.getOnDown(n.button) : t === "mouseup" ? n.detail = this.clickCount.getOnUp(n.button) : (t === "click" || t === "auxclick") && (n.detail = this.clickCount.incOnClick(n.button)), n;
|
|
16448
16456
|
}
|
|
16449
16457
|
getTarget(t) {
|
|
16450
16458
|
var r;
|
|
@@ -16641,7 +16649,7 @@ class sx {
|
|
|
16641
16649
|
pointerId: this.pointerId,
|
|
16642
16650
|
pointerType: this.pointerType,
|
|
16643
16651
|
isPrimary: this.isPrimary,
|
|
16644
|
-
button:
|
|
16652
|
+
button: Ai(t),
|
|
16645
16653
|
buttons: this.buttons.getButtons()
|
|
16646
16654
|
};
|
|
16647
16655
|
}
|
|
@@ -17077,7 +17085,7 @@ async function Ix(e, t, { skipClick: r = this.config.skipClick, skipAutoClose: n
|
|
|
17077
17085
|
e.disabled || (r || await this.click(e), o !== void 0 && xo(e, o, a ?? o), await this.keyboard(t), n || await Rx(this));
|
|
17078
17086
|
}
|
|
17079
17087
|
const Cd = /* @__PURE__ */ Symbol("files and value properties are mocked");
|
|
17080
|
-
function
|
|
17088
|
+
function ri(e, t, r) {
|
|
17081
17089
|
r ? Object.defineProperty(e, t, r) : delete e[t];
|
|
17082
17090
|
}
|
|
17083
17091
|
function Nx(e, t) {
|
|
@@ -17085,7 +17093,7 @@ function Nx(e, t) {
|
|
|
17085
17093
|
(r = e[Cd]) === null || r === void 0 || r.restore();
|
|
17086
17094
|
const n = Object.getOwnPropertyDescriptor(e, "type"), o = Object.getOwnPropertyDescriptor(e, "value"), a = Object.getOwnPropertyDescriptor(e, "files");
|
|
17087
17095
|
function i() {
|
|
17088
|
-
|
|
17096
|
+
ri(e, "type", n), ri(e, "value", o), ri(e, "files", a);
|
|
17089
17097
|
}
|
|
17090
17098
|
e[Cd] = {
|
|
17091
17099
|
restore: i
|
|
@@ -17307,7 +17315,7 @@ const aC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
17307
17315
|
...aC,
|
|
17308
17316
|
setup: Bx
|
|
17309
17317
|
};
|
|
17310
|
-
function
|
|
17318
|
+
function ni(e, t, r) {
|
|
17311
17319
|
switch (t) {
|
|
17312
17320
|
case "type":
|
|
17313
17321
|
return `Event fired: Typed "${r[1]}" into element`;
|
|
@@ -17341,14 +17349,14 @@ function Up(e, t = "userEvent") {
|
|
|
17341
17349
|
return Up(s, `${t}.instance`);
|
|
17342
17350
|
} : n === "type" ? async (...i) => {
|
|
17343
17351
|
if (document.visibilityState === "hidden" || !document.hasFocus()) {
|
|
17344
|
-
sC(i[0], i[1]), me(
|
|
17352
|
+
sC(i[0], i[1]), me(ni(t, n, i));
|
|
17345
17353
|
return;
|
|
17346
17354
|
}
|
|
17347
17355
|
const s = await a(...i);
|
|
17348
|
-
return me(
|
|
17356
|
+
return me(ni(t, n, i)), s;
|
|
17349
17357
|
} : async (...i) => {
|
|
17350
17358
|
const s = await a(...i);
|
|
17351
|
-
return me(
|
|
17359
|
+
return me(ni(t, n, i)), s;
|
|
17352
17360
|
};
|
|
17353
17361
|
}
|
|
17354
17362
|
});
|
|
@@ -17366,10 +17374,10 @@ const uC = () => document.querySelector("body > :not(#twd-sidebar-root):not(scri
|
|
|
17366
17374
|
const r = uC(), o = bp(r)[e];
|
|
17367
17375
|
if (typeof o == "function")
|
|
17368
17376
|
return o(...t);
|
|
17369
|
-
const a =
|
|
17377
|
+
const a = Ua[e];
|
|
17370
17378
|
return typeof a == "function" ? a(...t) : a;
|
|
17371
17379
|
}, dC = (e, t) => {
|
|
17372
|
-
const r =
|
|
17380
|
+
const r = Ua[e];
|
|
17373
17381
|
return typeof r != "function" ? r : r(...t);
|
|
17374
17382
|
};
|
|
17375
17383
|
function zp(e, t = "screen", r = !1) {
|
|
@@ -17383,7 +17391,7 @@ function zp(e, t = "screen", r = !1) {
|
|
|
17383
17391
|
}
|
|
17384
17392
|
});
|
|
17385
17393
|
}
|
|
17386
|
-
const BC = zp(
|
|
17394
|
+
const BC = zp(Ua, "screen", !0), LC = zp(Ua, "screen", !1);
|
|
17387
17395
|
np({
|
|
17388
17396
|
getElementError(e) {
|
|
17389
17397
|
return new Error(`${e}`);
|