twd-js 1.6.2 → 1.6.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/bundled.es.js +57 -63
- package/dist/index.cjs.js +19 -19
- package/dist/index.d.ts +22 -0
- package/dist/index.es.js +256 -249
- package/dist/mock-sw.js +1 -1
- package/package.json +7 -7
package/dist/bundled.es.js
CHANGED
|
@@ -63,8 +63,8 @@ function ee() {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
function Oe(e, t, r, n, o, s, l, d, u, a, p) {
|
|
66
|
-
var i, f, _, w, C, k,
|
|
67
|
-
for (u = at(r, t, g, u, $), i = 0; i < $; i++) (_ = r.__k[i]) != null && (f = _.__i != -1 && g[_.__i] || Q, _.__i = i, k = he(e, _, f, o, s, l, d, u, a, p), w = _.__e, _.ref && f.ref != _.ref && (f.ref && ge(f.ref, null, _), p.push(_.ref, _.__c || w, _)), C == null && w != null && (C = w), (
|
|
66
|
+
var i, f, _, w, C, k, v, g = n && n.__k || Z, $ = t.length;
|
|
67
|
+
for (u = at(r, t, g, u, $), i = 0; i < $; i++) (_ = r.__k[i]) != null && (f = _.__i != -1 && g[_.__i] || Q, _.__i = i, k = he(e, _, f, o, s, l, d, u, a, p), w = _.__e, _.ref && f.ref != _.ref && (f.ref && ge(f.ref, null, _), p.push(_.ref, _.__c || w, _)), C == null && w != null && (C = w), (v = !!(4 & _.__u)) || f.__k === _.__k ? u = je(_, u, e, v) : typeof _.type == "function" && k !== void 0 ? u = k : w && (u = w.nextSibling), _.__u &= -7);
|
|
68
68
|
return r.__e = C, u;
|
|
69
69
|
}
|
|
70
70
|
function at(e, t, r, n, o) {
|
|
@@ -125,23 +125,23 @@ function Se(e) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
function he(e, t, r, n, o, s, l, d, u, a) {
|
|
128
|
-
var p, i, f, _, w, C, k,
|
|
128
|
+
var p, i, f, _, w, C, k, v, g, $, I, z, h, b, R, E = t.type;
|
|
129
129
|
if (t.constructor !== void 0) return null;
|
|
130
130
|
128 & r.__u && (u = !!(32 & r.__u), s = [d = t.__e = r.__e]), (p = y.__b) && p(t);
|
|
131
131
|
e: if (typeof E == "function") try {
|
|
132
|
-
if (
|
|
132
|
+
if (v = t.props, g = E.prototype && E.prototype.render, $ = (p = E.contextType) && n[p.__c], I = p ? $ ? $.props.value : p.__ : n, r.__c ? k = (i = t.__c = r.__c).__ = i.__E : (g ? t.__c = i = new E(v, I) : (t.__c = i = new K(v, I), i.constructor = E, i.render = ct), $ && $.sub(i), i.state || (i.state = {}), i.__n = n, f = i.__d = !0, i.__h = [], i._sb = []), g && i.__s == null && (i.__s = i.state), g && E.getDerivedStateFromProps != null && (i.__s == i.state && (i.__s = A({}, i.__s)), A(i.__s, E.getDerivedStateFromProps(v, i.__s))), _ = i.props, w = i.state, i.__v = t, f) g && E.getDerivedStateFromProps == null && i.componentWillMount != null && i.componentWillMount(), g && i.componentDidMount != null && i.__h.push(i.componentDidMount);
|
|
133
133
|
else {
|
|
134
|
-
if (g && E.getDerivedStateFromProps == null &&
|
|
135
|
-
t.__v != r.__v && (i.props =
|
|
134
|
+
if (g && E.getDerivedStateFromProps == null && v !== _ && i.componentWillReceiveProps != null && i.componentWillReceiveProps(v, I), t.__v == r.__v || !i.__e && i.shouldComponentUpdate != null && i.shouldComponentUpdate(v, i.__s, I) === !1) {
|
|
135
|
+
t.__v != r.__v && (i.props = v, i.state = i.__s, i.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.some(function(W) {
|
|
136
136
|
W && (W.__ = t);
|
|
137
137
|
}), Z.push.apply(i.__h, i._sb), i._sb = [], i.__h.length && l.push(i);
|
|
138
138
|
break e;
|
|
139
139
|
}
|
|
140
|
-
i.componentWillUpdate != null && i.componentWillUpdate(
|
|
140
|
+
i.componentWillUpdate != null && i.componentWillUpdate(v, i.__s, I), g && i.componentDidUpdate != null && i.__h.push(function() {
|
|
141
141
|
i.componentDidUpdate(_, w, C);
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
if (i.context = I, i.props =
|
|
144
|
+
if (i.context = I, i.props = v, i.__P = e, i.__e = !1, z = y.__r, h = 0, g) i.state = i.__s, i.__d = !1, z && z(t), p = i.render(i.props, i.state, i.context), Z.push.apply(i.__h, i._sb), i._sb = [];
|
|
145
145
|
else do
|
|
146
146
|
i.__d = !1, z && z(t), p = i.render(i.props, i.state, i.context), i.state = i.__s;
|
|
147
147
|
while (i.__d && ++h < 25);
|
|
@@ -179,7 +179,7 @@ function qe(e) {
|
|
|
179
179
|
return typeof e != "object" || e == null || e.__b > 0 ? e : ne(e) ? e.map(qe) : A({}, e);
|
|
180
180
|
}
|
|
181
181
|
function dt(e, t, r, n, o, s, l, d, u) {
|
|
182
|
-
var a, p, i, f, _, w, C, k = r.props || Q,
|
|
182
|
+
var a, p, i, f, _, w, C, k = r.props || Q, v = t.props, g = t.type;
|
|
183
183
|
if (g == "svg" ? o = "http://www.w3.org/2000/svg" : g == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), s != null) {
|
|
184
184
|
for (a = 0; a < s.length; a++) if ((_ = s[a]) && "setAttribute" in _ == !!g && (g ? _.localName == g : _.nodeType == 3)) {
|
|
185
185
|
e = _, s[a] = null;
|
|
@@ -187,14 +187,14 @@ function dt(e, t, r, n, o, s, l, d, u) {
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
if (e == null) {
|
|
190
|
-
if (g == null) return document.createTextNode(
|
|
191
|
-
e = document.createElementNS(o, g,
|
|
190
|
+
if (g == null) return document.createTextNode(v);
|
|
191
|
+
e = document.createElementNS(o, g, v.is && v), d && (y.__m && y.__m(t, s), d = !1), s = null;
|
|
192
192
|
}
|
|
193
|
-
if (g == null) k ===
|
|
193
|
+
if (g == null) k === v || d && e.data == v || (e.data = v);
|
|
194
194
|
else {
|
|
195
195
|
if (s = s && re.call(e.childNodes), !d && s != null) for (k = {}, a = 0; a < e.attributes.length; a++) k[(_ = e.attributes[a]).name] = _.value;
|
|
196
|
-
for (a in k) _ = k[a], a == "dangerouslySetInnerHTML" ? i = _ : a == "children" || a in
|
|
197
|
-
for (a in
|
|
196
|
+
for (a in k) _ = k[a], a == "dangerouslySetInnerHTML" ? i = _ : a == "children" || a in v || a == "value" && "defaultValue" in v || a == "checked" && "defaultChecked" in v || J(e, a, null, _, o);
|
|
197
|
+
for (a in v) _ = v[a], a == "children" ? f = _ : a == "dangerouslySetInnerHTML" ? p = _ : a == "value" ? w = _ : a == "checked" ? C = _ : d && typeof _ != "function" || k[a] === _ || J(e, a, _, k[a], o);
|
|
198
198
|
if (p) d || i && (p.__html == i.__html || p.__html == e.innerHTML) || (e.innerHTML = p.__html), t.__k = [];
|
|
199
199
|
else if (i && (e.innerHTML = ""), Oe(t.type == "template" ? e.content : e, ne(f) ? f : [f], t, r, n, g == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, l, s ? s[0] : r.__k && H(r, 0), d, u), s != null) for (a = s.length; a--; ) fe(s[a]);
|
|
200
200
|
d || (a = "value", g == "progress" && w == null ? e.removeAttribute("value") : w != null && (w !== e[a] || g == "progress" && !w || g == "option" && w != k[a]) && J(e, a, w, k[a], o), a = "checked", C != null && C != e[a] && J(e, a, C, k[a], o));
|
|
@@ -297,11 +297,10 @@ var _t = {
|
|
|
297
297
|
iconColorSecondary: "#cbd5e1"
|
|
298
298
|
};
|
|
299
299
|
function pt(e = {}) {
|
|
300
|
-
|
|
300
|
+
return Object.entries({
|
|
301
301
|
..._t,
|
|
302
302
|
...e
|
|
303
|
-
}
|
|
304
|
-
return Object.entries(t).map(([r, n]) => `${`--twd-${r.replace(/([A-Z])/g, "-$1").toLowerCase()}`}: ${n};`).join(`
|
|
303
|
+
}).map(([t, r]) => `${`--twd-${t.replace(/([A-Z])/g, "-$1").toLowerCase()}`}: ${r};`).join(`
|
|
305
304
|
`);
|
|
306
305
|
}
|
|
307
306
|
function ft(e) {
|
|
@@ -787,9 +786,9 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
|
|
|
787
786
|
if (i) {
|
|
788
787
|
const f = s.current?.closest('[data-testid="twd-sidebar"]');
|
|
789
788
|
if (f) {
|
|
790
|
-
const _ = i.getBoundingClientRect(), w = f.getBoundingClientRect(), C = f.scrollTop, k = _.top - w.top + C;
|
|
789
|
+
const _ = i.getBoundingClientRect(), w = f.getBoundingClientRect(), C = f.scrollTop, k = _.top - w.top + C, v = f.querySelector('[data-testid="twd-sidebar-header"]'), g = v ? v.getBoundingClientRect().height + 16 : 150;
|
|
791
790
|
f.scrollTo({
|
|
792
|
-
top: k -
|
|
791
|
+
top: k - g,
|
|
793
792
|
behavior: "smooth"
|
|
794
793
|
});
|
|
795
794
|
}
|
|
@@ -896,6 +895,7 @@ var se = ({ className: e, children: t, dataTestId: r }) => /* @__PURE__ */ c("sv
|
|
|
896
895
|
position: "fixed",
|
|
897
896
|
top: "50%",
|
|
898
897
|
transform: "translateY(-50%)",
|
|
898
|
+
zIndex: "var(--twd-z-index-sidebar)",
|
|
899
899
|
background: "var(--twd-button-primary)",
|
|
900
900
|
color: "var(--twd-button-primary-text)",
|
|
901
901
|
padding: "var(--twd-spacing-sm) 10px",
|
|
@@ -953,9 +953,9 @@ var Dt = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STAT
|
|
|
953
953
|
beforeEachHooks: /* @__PURE__ */ new Map(),
|
|
954
954
|
afterEachHooks: /* @__PURE__ */ new Map(),
|
|
955
955
|
stack: []
|
|
956
|
-
}, ie = Dt(),
|
|
956
|
+
}, ie = Dt(), m = ie.handlers, ze = ie.beforeEachHooks, Ne = ie.afterEachHooks, T = ie.stack, B = () => Math.random().toString(36).slice(2, 11), Ye = (e, t) => {
|
|
957
957
|
const r = B(), n = T.at(-1);
|
|
958
|
-
|
|
958
|
+
m.set(r, {
|
|
959
959
|
id: r,
|
|
960
960
|
name: e,
|
|
961
961
|
type: "suite",
|
|
@@ -964,11 +964,11 @@ var Dt = () => typeof window < "u" ? (window.__TWD_STATE__ || (window.__TWD_STAT
|
|
|
964
964
|
depth: T.length,
|
|
965
965
|
parent: n,
|
|
966
966
|
handler: t
|
|
967
|
-
}), n &&
|
|
967
|
+
}), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
|
|
968
968
|
};
|
|
969
969
|
Ye.only = (e, t) => {
|
|
970
970
|
const r = B(), n = T.at(-1);
|
|
971
|
-
|
|
971
|
+
m.set(r, {
|
|
972
972
|
id: r,
|
|
973
973
|
name: e,
|
|
974
974
|
type: "suite",
|
|
@@ -978,11 +978,11 @@ Ye.only = (e, t) => {
|
|
|
978
978
|
parent: n,
|
|
979
979
|
handler: t,
|
|
980
980
|
only: !0
|
|
981
|
-
}), n &&
|
|
981
|
+
}), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
|
|
982
982
|
};
|
|
983
983
|
Ye.skip = (e, t) => {
|
|
984
984
|
const r = B(), n = T.at(-1);
|
|
985
|
-
|
|
985
|
+
m.set(r, {
|
|
986
986
|
id: r,
|
|
987
987
|
name: e,
|
|
988
988
|
type: "suite",
|
|
@@ -992,7 +992,7 @@ Ye.skip = (e, t) => {
|
|
|
992
992
|
parent: n,
|
|
993
993
|
handler: t,
|
|
994
994
|
skip: !0
|
|
995
|
-
}), n &&
|
|
995
|
+
}), n && m.get(n).children.push(r), T.push(r), t(), T.pop();
|
|
996
996
|
};
|
|
997
997
|
var Qe = (e, t) => {
|
|
998
998
|
const r = B(), n = T.at(-1), o = {
|
|
@@ -1004,7 +1004,7 @@ var Qe = (e, t) => {
|
|
|
1004
1004
|
logs: [],
|
|
1005
1005
|
parent: n
|
|
1006
1006
|
};
|
|
1007
|
-
n &&
|
|
1007
|
+
n && m.get(n).children.push(r), m.set(r, o);
|
|
1008
1008
|
};
|
|
1009
1009
|
Qe.only = (e, t) => {
|
|
1010
1010
|
const r = B(), n = T.at(-1), o = {
|
|
@@ -1017,7 +1017,7 @@ Qe.only = (e, t) => {
|
|
|
1017
1017
|
parent: n,
|
|
1018
1018
|
only: !0
|
|
1019
1019
|
};
|
|
1020
|
-
n &&
|
|
1020
|
+
n && m.get(n).children.push(r), m.set(r, o);
|
|
1021
1021
|
};
|
|
1022
1022
|
Qe.skip = (e, t) => {
|
|
1023
1023
|
const r = B(), n = T.at(-1), o = {
|
|
@@ -1031,34 +1031,34 @@ Qe.skip = (e, t) => {
|
|
|
1031
1031
|
parent: n,
|
|
1032
1032
|
skip: !0
|
|
1033
1033
|
};
|
|
1034
|
-
n &&
|
|
1034
|
+
n && m.get(n).children.push(r), m.set(r, o);
|
|
1035
1035
|
};
|
|
1036
1036
|
var Pt = (e) => {
|
|
1037
1037
|
const t = [], r = [];
|
|
1038
1038
|
let n = e;
|
|
1039
1039
|
for (; n; )
|
|
1040
|
-
ze.has(n) && t.unshift(...ze.get(n)), Ne.has(n) && r.push(...Ne.get(n)), n =
|
|
1040
|
+
ze.has(n) && t.unshift(...ze.get(n)), Ne.has(n) && r.push(...Ne.get(n)), n = m.get(n)?.parent;
|
|
1041
1041
|
return {
|
|
1042
1042
|
before: t,
|
|
1043
1043
|
after: r
|
|
1044
1044
|
};
|
|
1045
1045
|
}, F = (e) => {
|
|
1046
|
-
const t =
|
|
1046
|
+
const t = m.get(e);
|
|
1047
1047
|
return t ? t.only ? !0 : t.children ? t.children.some((r) => F(r)) : !1 : !1;
|
|
1048
1048
|
}, Ft = (e) => {
|
|
1049
|
-
let t =
|
|
1049
|
+
let t = m.get(e);
|
|
1050
1050
|
for (; t?.parent; ) {
|
|
1051
|
-
const r =
|
|
1051
|
+
const r = m.get(t.parent);
|
|
1052
1052
|
if (r?.only) return !0;
|
|
1053
1053
|
t = r;
|
|
1054
1054
|
}
|
|
1055
1055
|
return !1;
|
|
1056
1056
|
}, le = (e) => {
|
|
1057
|
-
let t =
|
|
1057
|
+
let t = m.get(e);
|
|
1058
1058
|
for (; t; ) {
|
|
1059
1059
|
if (t.skip) return !0;
|
|
1060
1060
|
if (!t.parent) break;
|
|
1061
|
-
t =
|
|
1061
|
+
t = m.get(t.parent);
|
|
1062
1062
|
}
|
|
1063
1063
|
return !1;
|
|
1064
1064
|
}, Ze = class {
|
|
@@ -1066,18 +1066,18 @@ var Pt = (e) => {
|
|
|
1066
1066
|
Me(this, "events", void 0), Me(this, "retryCount", void 0), this.events = e, this.retryCount = t?.retryCount ?? 1;
|
|
1067
1067
|
}
|
|
1068
1068
|
async runAll() {
|
|
1069
|
-
const e = Array.from(
|
|
1069
|
+
const e = Array.from(m.values()).filter((r) => !r.parent && r.type === "suite"), t = Array.from(m.values()).some((r) => r.only);
|
|
1070
1070
|
for (const r of e) await this.runSuite(r, t);
|
|
1071
|
-
return
|
|
1071
|
+
return m;
|
|
1072
1072
|
}
|
|
1073
1073
|
async runSingle(e) {
|
|
1074
|
-
const t =
|
|
1074
|
+
const t = m.get(e);
|
|
1075
1075
|
!t || t.type !== "test" || await this.runTest(t, !1);
|
|
1076
1076
|
}
|
|
1077
1077
|
async runByIds(e) {
|
|
1078
|
-
const t = new Set(e), r = Array.from(
|
|
1078
|
+
const t = new Set(e), r = Array.from(m.values()).filter((o) => !o.parent && o.type === "suite"), n = Array.from(m.values()).some((o) => o.only);
|
|
1079
1079
|
for (const o of r) await this.runSuiteByIds(o, t, n);
|
|
1080
|
-
return
|
|
1080
|
+
return m;
|
|
1081
1081
|
}
|
|
1082
1082
|
async runSuiteByIds(e, t, r) {
|
|
1083
1083
|
if (!this.hasDescendantInSet(e, t)) return;
|
|
@@ -1087,13 +1087,13 @@ var Pt = (e) => {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
if (r && !F(e.id)) return;
|
|
1089
1089
|
this.events.onSuiteStart?.(e);
|
|
1090
|
-
const n = (e.children || []).map((o) =>
|
|
1090
|
+
const n = (e.children || []).map((o) => m.get(o));
|
|
1091
1091
|
for (const o of n) o.type === "suite" ? await this.runSuiteByIds(o, t, r) : o.type === "test" && t.has(o.id) && await this.runTest(o, r);
|
|
1092
1092
|
this.events.onSuiteEnd?.(e);
|
|
1093
1093
|
}
|
|
1094
1094
|
hasDescendantInSet(e, t) {
|
|
1095
1095
|
return t.has(e.id) ? !0 : e.children ? e.children.some((r) => {
|
|
1096
|
-
const n =
|
|
1096
|
+
const n = m.get(r);
|
|
1097
1097
|
return n ? this.hasDescendantInSet(n, t) : !1;
|
|
1098
1098
|
}) : !1;
|
|
1099
1099
|
}
|
|
@@ -1104,7 +1104,7 @@ var Pt = (e) => {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
if (t && !F(e.id)) return;
|
|
1106
1106
|
this.events.onSuiteStart?.(e);
|
|
1107
|
-
const r = (e.children || []).map((n) =>
|
|
1107
|
+
const r = (e.children || []).map((n) => m.get(n));
|
|
1108
1108
|
for (const n of r) n.type === "suite" ? await this.runSuite(n, t) : n.type === "test" && await this.runTest(n, t);
|
|
1109
1109
|
this.events.onSuiteEnd?.(e);
|
|
1110
1110
|
}
|
|
@@ -1134,7 +1134,7 @@ var Pt = (e) => {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
};
|
|
1136
1136
|
window.__testRunner = Ze;
|
|
1137
|
-
var me = "1.6.
|
|
1137
|
+
var me = "1.6.4", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
|
|
1138
1138
|
rules: [],
|
|
1139
1139
|
counts: {}
|
|
1140
1140
|
}), window.__TWD_MOCK_STATE__) : {
|
|
@@ -1145,18 +1145,14 @@ var me = "1.6.2", Ot = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ ||
|
|
|
1145
1145
|
console.warn("[TWD] Request mocking already initialized");
|
|
1146
1146
|
return;
|
|
1147
1147
|
}
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
l && (l.executed = !0, l.request = o, l.hitCount = s), q.counts[n] = s ?? (q.counts[n] ?? 0) + 1;
|
|
1157
|
-
}
|
|
1158
|
-
});
|
|
1159
|
-
}
|
|
1148
|
+
"serviceWorker" in navigator && (We = !0, await navigator.serviceWorker.register(`${e ?? "/mock-sw.js"}?v=${me}`), navigator.serviceWorker.controller || await new Promise((t) => {
|
|
1149
|
+
navigator.serviceWorker.addEventListener("controllerchange", t, { once: !0 });
|
|
1150
|
+
}), navigator.serviceWorker.addEventListener("message", (t) => {
|
|
1151
|
+
if (t.data?.type === "EXECUTED") {
|
|
1152
|
+
const { alias: r, request: n, hitCount: o } = t.data, s = ye.find((l) => l.alias === r);
|
|
1153
|
+
s && (s.executed = !0, s.request = n, s.hitCount = o), q.counts[r] = o ?? (q.counts[r] ?? 0) + 1;
|
|
1154
|
+
}
|
|
1155
|
+
}));
|
|
1160
1156
|
}, Ut = () => ye, qt = () => {
|
|
1161
1157
|
navigator.serviceWorker.controller?.postMessage({
|
|
1162
1158
|
type: "CLEAR_RULES",
|
|
@@ -1232,10 +1228,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
|
|
|
1232
1228
|
message: e.message
|
|
1233
1229
|
}, Yt = (e) => {
|
|
1234
1230
|
const t = et(e);
|
|
1235
|
-
|
|
1236
|
-
const r = t.operator || "unknown";
|
|
1237
|
-
console.error(`Assertion failed with operator: ${r}`), console.group("Expected:"), console.log(t.expected), console.groupEnd(), console.group("Actual:"), console.log(t.actual), console.groupEnd();
|
|
1238
|
-
} else console.error(t.message);
|
|
1231
|
+
t.type === "diff" ? (console.error(`Assertion failed with operator: ${t.operator || "unknown"}`), console.group("Expected:"), console.log(t.expected), console.groupEnd(), console.group("Actual:"), console.log(t.actual), console.groupEnd()) : console.error(t.message);
|
|
1239
1232
|
}, Qt = (e) => {
|
|
1240
1233
|
if (e.status === "pass") return `Test "${e.name}" passed.`;
|
|
1241
1234
|
if (e.status === "fail") {
|
|
@@ -1354,7 +1347,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
|
|
|
1354
1347
|
p(h), h ? sessionStorage.setItem("twd-search-filter", h) : sessionStorage.removeItem("twd-search-filter");
|
|
1355
1348
|
}, _ = (h) => {
|
|
1356
1349
|
l(h), sessionStorage.setItem("twd-sidebar-open", h.toString());
|
|
1357
|
-
}, w = Array.from(
|
|
1350
|
+
}, w = Array.from(m.values()), C = N(() => rr(w), [n]), k = N(() => tr(C, a), [C, a]), { filteredTestIds: v, displayTests: g } = N(() => {
|
|
1358
1351
|
if (a) {
|
|
1359
1352
|
const h = tt(k), b = new Set(h);
|
|
1360
1353
|
return {
|
|
@@ -1371,9 +1364,9 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
|
|
|
1371
1364
|
a,
|
|
1372
1365
|
n
|
|
1373
1366
|
]), $ = async () => {
|
|
1374
|
-
u(""), sessionStorage.removeItem("twd-last-run-test-name"),
|
|
1367
|
+
u(""), sessionStorage.removeItem("twd-last-run-test-name"), v ? await i.runByIds(v) : await i.runAll(), u(Zt(w));
|
|
1375
1368
|
}, I = async (h) => {
|
|
1376
|
-
const b = Array.from(
|
|
1369
|
+
const b = Array.from(m.values()).filter((R) => R.type === "test").find((R) => R.id === h);
|
|
1377
1370
|
b && (u(""), sessionStorage.setItem("twd-last-run-test-name", b.name), await i.runSingle(b.id), u(Qt(b)));
|
|
1378
1371
|
};
|
|
1379
1372
|
if (!s) return /* @__PURE__ */ c(Nt, {
|
|
@@ -1418,6 +1411,7 @@ var Kt = (e) => e instanceof Error && "actual" in e && "expected" in e, et = (e)
|
|
|
1418
1411
|
children: d
|
|
1419
1412
|
}),
|
|
1420
1413
|
/* @__PURE__ */ c("div", {
|
|
1414
|
+
"data-testid": "twd-sidebar-header",
|
|
1421
1415
|
style: {
|
|
1422
1416
|
padding: "var(--twd-spacing-md)",
|
|
1423
1417
|
background: "var(--twd-background)",
|