@rstest/browser 0.10.2 → 0.10.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/{323.js → 626.js} +2 -3
- package/dist/browser-container/container-static/js/{188.480c3c49b5.js → 3.d3d6c6e4cf.js} +2908 -2915
- package/dist/browser-container/container-static/js/3.d3d6c6e4cf.js.LICENSE.txt +1 -0
- package/dist/browser-container/container-static/js/{index.29fc60be33.js → index.8fb1588e4a.js} +431 -455
- package/dist/browser-container/container-static/js/{lib-react.5ae9b90ee5.js → lib-react.62b27a21db.js} +21 -21
- package/dist/browser-container/container-static/js/lib-react.62b27a21db.js.LICENSE.txt +1 -0
- package/dist/browser-container/index.html +1 -1
- package/dist/browser.js +5 -5
- package/dist/client/dispatchTransport.d.ts +19 -0
- package/dist/client/public.d.ts +3 -3
- package/dist/client/sourceMapSupport.d.ts +1 -1
- package/dist/concurrency.d.ts +3 -3
- package/dist/configValidation.d.ts +2 -2
- package/dist/dispatchCapabilities.d.ts +1 -1
- package/dist/hostController.d.ts +3 -3
- package/dist/index.d.ts +5 -5
- package/dist/index.js +209 -221
- package/dist/protocol.d.ts +45 -18
- package/dist/providers/index.d.ts +11 -1
- package/dist/rpcProtocol.d.ts +32 -18
- package/dist/rslib-runtime.js +9 -5
- package/dist/viewportPresets.d.ts +5 -0
- package/package.json +8 -8
- package/src/AGENTS.md +7 -1
- package/src/client/dispatchTransport.ts +63 -1
- package/src/client/entry.ts +25 -58
- package/src/client/public.ts +3 -3
- package/src/client/snapshot.ts +24 -22
- package/src/client/sourceMapSupport.ts +1 -1
- package/src/concurrency.ts +6 -20
- package/src/configValidation.ts +2 -2
- package/src/dispatchCapabilities.ts +102 -83
- package/src/env.d.ts +6 -2
- package/src/hostController.ts +76 -42
- package/src/index.ts +22 -11
- package/src/protocol.ts +66 -22
- package/src/providers/index.ts +11 -1
- package/src/providers/playwright/runtime.ts +104 -4
- package/src/rpcProtocol.ts +34 -21
- package/src/viewportPresets.ts +5 -0
- package/src/watchCliShortcuts.ts +2 -4
- package/dist/browser-container/container-static/js/188.480c3c49b5.js.LICENSE.txt +0 -1
- package/dist/browser-container/container-static/js/lib-react.5ae9b90ee5.js.LICENSE.txt +0 -1
package/dist/browser-container/container-static/js/{index.29fc60be33.js → index.8fb1588e4a.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
(()=>{
|
|
2
2
|
"use strict";
|
|
3
3
|
var e, t, s, l, r, o, a = {
|
|
4
|
-
|
|
5
|
-
var l = s(
|
|
6
|
-
let r = "__rstest_dispatch_response__"
|
|
7
|
-
var
|
|
8
|
-
let
|
|
4
|
+
1617 (e, t, s) {
|
|
5
|
+
var l = s(9793);
|
|
6
|
+
let r = "__rstest_dispatch_response__";
|
|
7
|
+
var o = s(619), a = s(5203), i = s(1499), n = s(405), c = s(7541);
|
|
8
|
+
let d = (e)=>{
|
|
9
9
|
let { message: t } = e;
|
|
10
10
|
return (0, l.jsx)("div", {
|
|
11
11
|
className: "absolute inset-0 z-10 flex items-center justify-center bg-black/[0.02]",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
})
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
var
|
|
19
|
-
let
|
|
18
|
+
var u = s(4079), p = s(4198), h = s(3862), f = s(1529), x = s(1051);
|
|
19
|
+
let m = (e, t)=>{
|
|
20
20
|
if (!t) return e;
|
|
21
21
|
let s = t.endsWith("/") ? t.slice(0, -1) : t;
|
|
22
22
|
if (e.startsWith(s)) {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
return t.startsWith("/") ? t.slice(1) : t;
|
|
25
25
|
}
|
|
26
26
|
return e;
|
|
27
|
-
},
|
|
27
|
+
}, g = (e)=>{
|
|
28
28
|
window.parent?.postMessage({
|
|
29
29
|
type: "open-in-editor",
|
|
30
30
|
payload: {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
}
|
|
33
33
|
}, "*"), fetch(`/__open-in-editor?file=${encodeURIComponent(e)}`).catch(()=>{});
|
|
34
34
|
};
|
|
35
|
-
var
|
|
36
|
-
let
|
|
35
|
+
var j = s(4759), v = s(9119), y = s(6505), _ = s(1165), C = s(4172);
|
|
36
|
+
let w = {
|
|
37
37
|
idle: {
|
|
38
38
|
label: "Idle",
|
|
39
39
|
color: "var(--accents-5)",
|
|
40
|
-
icon: (0, l.jsx)(
|
|
40
|
+
icon: (0, l.jsx)(j.A, {
|
|
41
41
|
size: 14,
|
|
42
42
|
strokeWidth: 2.5
|
|
43
43
|
})
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
running: {
|
|
46
46
|
label: "Running",
|
|
47
47
|
color: "var(--ds-amber-700)",
|
|
48
|
-
icon: (0, l.jsx)(
|
|
48
|
+
icon: (0, l.jsx)(v.A, {
|
|
49
49
|
size: 14,
|
|
50
50
|
className: "animate-spin",
|
|
51
51
|
strokeWidth: 2.5
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
pass: {
|
|
55
55
|
label: "Pass",
|
|
56
56
|
color: "var(--ds-green-700)",
|
|
57
|
-
icon: (0, l.jsx)(
|
|
57
|
+
icon: (0, l.jsx)(y.A, {
|
|
58
58
|
size: 14,
|
|
59
59
|
strokeWidth: 2.5
|
|
60
60
|
})
|
|
@@ -62,24 +62,24 @@
|
|
|
62
62
|
fail: {
|
|
63
63
|
label: "Fail",
|
|
64
64
|
color: "var(--ds-red-800)",
|
|
65
|
-
icon: (0, l.jsx)(
|
|
65
|
+
icon: (0, l.jsx)(_.A, {
|
|
66
66
|
size: 14,
|
|
67
67
|
strokeWidth: 2.5
|
|
68
68
|
})
|
|
69
69
|
}
|
|
70
|
-
},
|
|
71
|
-
...
|
|
70
|
+
}, b = {
|
|
71
|
+
...w,
|
|
72
72
|
skip: {
|
|
73
73
|
label: "Skip",
|
|
74
74
|
color: "var(--accents-4)",
|
|
75
|
-
icon: (0, l.jsx)(
|
|
75
|
+
icon: (0, l.jsx)(C.A, {
|
|
76
76
|
size: 14,
|
|
77
77
|
strokeWidth: 2.5
|
|
78
78
|
})
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
var
|
|
82
|
-
let
|
|
81
|
+
var k = s(5910), S = s(4625), F = s(1874), N = s(4776), A = s(2353), P = s(5502), M = s(5087), z = s(8231);
|
|
82
|
+
let O = {
|
|
83
83
|
iPhoneSE: {
|
|
84
84
|
width: 375,
|
|
85
85
|
height: 667
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
width: 1280,
|
|
149
149
|
height: 800
|
|
150
150
|
}
|
|
151
|
-
},
|
|
151
|
+
}, R = {
|
|
152
152
|
iPhoneSE: "iPhone SE",
|
|
153
153
|
iPhoneXR: "iPhone XR",
|
|
154
154
|
iPhone12Pro: "iPhone 12 Pro",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
SamsungGalaxyA51A71: "Samsung Galaxy A51/71",
|
|
167
167
|
NestHub: "Nest Hub",
|
|
168
168
|
NestHubMax: "Nest Hub Max"
|
|
169
|
-
},
|
|
169
|
+
}, E = [
|
|
170
170
|
"iPhoneSE",
|
|
171
171
|
"iPhoneXR",
|
|
172
172
|
"iPhone12Pro",
|
|
@@ -185,19 +185,19 @@
|
|
|
185
185
|
"NestHub",
|
|
186
186
|
"NestHubMax"
|
|
187
187
|
].map((e)=>{
|
|
188
|
-
let t =
|
|
188
|
+
let t = O[e];
|
|
189
189
|
return {
|
|
190
190
|
id: e,
|
|
191
|
-
label:
|
|
191
|
+
label: R[e],
|
|
192
192
|
width: t.width,
|
|
193
193
|
height: t.height
|
|
194
194
|
};
|
|
195
|
-
}),
|
|
196
|
-
let t =
|
|
195
|
+
}), U = new Set(E.map((e)=>e.id)), T = (e)=>"string" == typeof e && U.has(e), $ = (e)=>{
|
|
196
|
+
let t = E.find((t)=>t.id === e);
|
|
197
197
|
if (!t) throw Error(`Unknown device preset: ${e}`);
|
|
198
198
|
return t;
|
|
199
|
-
},
|
|
200
|
-
let { token: t, value: s, onChange: r } = e, [o, a] = (0,
|
|
199
|
+
}, I = (e, t, s)=>Math.min(s, Math.max(t, e)), B = (e)=>{
|
|
200
|
+
let { token: t, value: s, onChange: r } = e, [o, a] = (0, n.useState)(!1), i = (0, n.useRef)({
|
|
201
201
|
width: 800,
|
|
202
202
|
height: 600
|
|
203
203
|
});
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
width: s.width,
|
|
206
206
|
height: s.height
|
|
207
207
|
});
|
|
208
|
-
let
|
|
208
|
+
let c = "full" === s.mode ? "full" : "responsive" === s.mode ? "responsive" : s.preset, d = (0, n.useMemo)(()=>[
|
|
209
209
|
{
|
|
210
210
|
value: "full",
|
|
211
211
|
label: "Full"
|
|
@@ -214,22 +214,22 @@
|
|
|
214
214
|
value: "responsive",
|
|
215
215
|
label: "Responsive"
|
|
216
216
|
},
|
|
217
|
-
...
|
|
217
|
+
...E.map((e)=>{
|
|
218
218
|
let t;
|
|
219
219
|
return {
|
|
220
220
|
value: e.id,
|
|
221
|
-
label: (t =
|
|
221
|
+
label: (t = $(e.id), `${t.label} (${t.width} x ${t.height})`)
|
|
222
222
|
};
|
|
223
223
|
})
|
|
224
|
-
], []),
|
|
224
|
+
], []), h = (0, l.jsxs)("div", {
|
|
225
225
|
className: "w-[280px]",
|
|
226
226
|
"data-testid": "viewport-popover",
|
|
227
227
|
children: [
|
|
228
228
|
(0, l.jsxs)("div", {
|
|
229
229
|
className: "flex items-center gap-2",
|
|
230
230
|
children: [
|
|
231
|
-
(0, l.jsx)(
|
|
232
|
-
value:
|
|
231
|
+
(0, l.jsx)(k.A, {
|
|
232
|
+
value: c,
|
|
233
233
|
options: d,
|
|
234
234
|
listHeight: 280,
|
|
235
235
|
dropdownStyle: {
|
|
@@ -260,17 +260,17 @@
|
|
|
260
260
|
popupMatchSelectWidth: !1,
|
|
261
261
|
"data-testid": "viewport-preset-select"
|
|
262
262
|
}),
|
|
263
|
-
(0, l.jsx)(
|
|
263
|
+
(0, l.jsx)(u.A, {
|
|
264
264
|
title: "Rotate",
|
|
265
265
|
mouseLeaveDelay: 0,
|
|
266
|
-
children: (0, l.jsx)(
|
|
266
|
+
children: (0, l.jsx)(p.Ay, {
|
|
267
267
|
type: "text",
|
|
268
268
|
size: "small",
|
|
269
269
|
disabled: "full" === s.mode,
|
|
270
270
|
className: "flex h-7 w-7 items-center justify-center rounded-md p-0 text-(--accents-4) hover:text-foreground hover:bg-(--accents-1) transition-all",
|
|
271
271
|
"data-testid": "viewport-rotate",
|
|
272
272
|
"aria-label": "Rotate viewport",
|
|
273
|
-
icon: (0, l.jsx)(
|
|
273
|
+
icon: (0, l.jsx)(z.A, {
|
|
274
274
|
size: 14,
|
|
275
275
|
strokeWidth: 2.2
|
|
276
276
|
}),
|
|
@@ -303,14 +303,14 @@
|
|
|
303
303
|
className: "mt-3 flex items-center gap-2",
|
|
304
304
|
"data-testid": "viewport-inputs",
|
|
305
305
|
children: [
|
|
306
|
-
(0, l.jsx)(
|
|
306
|
+
(0, l.jsx)(S.A, {
|
|
307
307
|
min: 1,
|
|
308
308
|
max: 1e4,
|
|
309
309
|
step: 1,
|
|
310
310
|
controls: !1,
|
|
311
311
|
value: s.width,
|
|
312
312
|
onChange: (e)=>{
|
|
313
|
-
let t =
|
|
313
|
+
let t = I(Number(e ?? s.width), 1, 1e4);
|
|
314
314
|
i.current = {
|
|
315
315
|
width: t,
|
|
316
316
|
height: s.height
|
|
@@ -329,14 +329,14 @@
|
|
|
329
329
|
className: "text-(--accents-4) select-none",
|
|
330
330
|
children: "x"
|
|
331
331
|
}),
|
|
332
|
-
(0, l.jsx)(
|
|
332
|
+
(0, l.jsx)(S.A, {
|
|
333
333
|
min: 1,
|
|
334
334
|
max: 1e4,
|
|
335
335
|
step: 1,
|
|
336
336
|
controls: !1,
|
|
337
337
|
value: s.height,
|
|
338
338
|
onChange: (e)=>{
|
|
339
|
-
let t =
|
|
339
|
+
let t = I(Number(e ?? s.height), 1, 1e4);
|
|
340
340
|
i.current = {
|
|
341
341
|
width: s.width,
|
|
342
342
|
height: t
|
|
@@ -355,13 +355,13 @@
|
|
|
355
355
|
})
|
|
356
356
|
]
|
|
357
357
|
});
|
|
358
|
-
return (0, l.jsx)(
|
|
359
|
-
content:
|
|
358
|
+
return (0, l.jsx)(F.A, {
|
|
359
|
+
content: h,
|
|
360
360
|
trigger: "click",
|
|
361
361
|
open: o,
|
|
362
362
|
onOpenChange: a,
|
|
363
363
|
placement: "bottomRight",
|
|
364
|
-
children: (0, l.jsxs)(
|
|
364
|
+
children: (0, l.jsxs)(p.Ay, {
|
|
365
365
|
type: "text",
|
|
366
366
|
size: "small",
|
|
367
367
|
className: "flex h-7 items-center gap-2 rounded-md px-2 text-(--accents-6) hover:text-foreground hover:bg-(--accents-1) transition-all",
|
|
@@ -371,19 +371,19 @@
|
|
|
371
371
|
(0, l.jsx)("span", {
|
|
372
372
|
className: "flex h-4 w-4 items-center justify-center text-(--accents-5)",
|
|
373
373
|
children: ((e)=>{
|
|
374
|
-
if ("full" === e.mode) return (0, l.jsx)(
|
|
374
|
+
if ("full" === e.mode) return (0, l.jsx)(N.A, {
|
|
375
375
|
size: 14,
|
|
376
376
|
strokeWidth: 2.2
|
|
377
377
|
});
|
|
378
|
-
if ("responsive" === e.mode) return (0, l.jsx)(
|
|
378
|
+
if ("responsive" === e.mode) return (0, l.jsx)(A.A, {
|
|
379
379
|
size: 14,
|
|
380
380
|
strokeWidth: 2.2
|
|
381
381
|
});
|
|
382
|
-
let t =
|
|
383
|
-
return t.startsWith("iPad") || t.startsWith("Surface") || t.startsWith("Nest Hub") || t.includes("Fold") ? (0, l.jsx)(
|
|
382
|
+
let t = $(e.preset).label;
|
|
383
|
+
return t.startsWith("iPad") || t.startsWith("Surface") || t.startsWith("Nest Hub") || t.includes("Fold") ? (0, l.jsx)(P.A, {
|
|
384
384
|
size: 14,
|
|
385
385
|
strokeWidth: 2.2
|
|
386
|
-
}) : (0, l.jsx)(
|
|
386
|
+
}) : (0, l.jsx)(M.A, {
|
|
387
387
|
size: 14,
|
|
388
388
|
strokeWidth: 2.2
|
|
389
389
|
});
|
|
@@ -394,15 +394,15 @@
|
|
|
394
394
|
style: {
|
|
395
395
|
color: t.colorTextSecondary
|
|
396
396
|
},
|
|
397
|
-
children: "full" === s.mode ? "Full" : "responsive" === s.mode ? `${s.width} x ${s.height}` :
|
|
397
|
+
children: "full" === s.mode ? "Full" : "responsive" === s.mode ? `${s.width} x ${s.height}` : $(s.preset).label
|
|
398
398
|
})
|
|
399
399
|
]
|
|
400
400
|
})
|
|
401
401
|
});
|
|
402
|
-
},
|
|
403
|
-
let { token: t, activeFile: s, rootPath: r, status: o, viewport: a, onViewportChange:
|
|
404
|
-
|
|
405
|
-
},
|
|
402
|
+
}, W = (e)=>{
|
|
403
|
+
let { token: t, activeFile: s, rootPath: r, status: o, viewport: a, onViewportChange: n } = e, { message: c } = i.A.useApp(), d = o ? w[o] : void 0, j = s ? m(s, r) : "", v = j.split("/"), y = v.pop(), _ = v.join("/"), C = async ()=>{
|
|
404
|
+
j && (await navigator.clipboard.writeText(j), c.success("relative path copied"));
|
|
405
|
+
}, b = "pass" === o ? "green" : "fail" === o ? "red" : "running" === o ? "amber" : null;
|
|
406
406
|
return (0, l.jsxs)("div", {
|
|
407
407
|
className: "flex h-[48px] items-center justify-between px-4",
|
|
408
408
|
"data-testid": "preview-header",
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
(0, l.jsxs)("div", {
|
|
415
415
|
className: "flex items-center gap-2 overflow-hidden",
|
|
416
416
|
children: [
|
|
417
|
-
(0, l.jsx)(
|
|
417
|
+
(0, l.jsx)(h.A, {
|
|
418
418
|
size: 16,
|
|
419
419
|
strokeWidth: 2,
|
|
420
420
|
className: "shrink-0 text-(--accents-7)"
|
|
@@ -445,10 +445,10 @@
|
|
|
445
445
|
s && (0, l.jsxs)("div", {
|
|
446
446
|
className: "flex items-center",
|
|
447
447
|
children: [
|
|
448
|
-
(0, l.jsx)(
|
|
448
|
+
(0, l.jsx)(u.A, {
|
|
449
449
|
title: "Copy relative path",
|
|
450
450
|
mouseLeaveDelay: 0,
|
|
451
|
-
children: (0, l.jsx)(
|
|
451
|
+
children: (0, l.jsx)(p.Ay, {
|
|
452
452
|
type: "text",
|
|
453
453
|
size: "small",
|
|
454
454
|
className: "flex ml-1 h-5 w-5 items-center justify-center rounded-md p-0 text-(--accents-4) hover:text-foreground hover:bg-(--accents-1) transition-all",
|
|
@@ -456,26 +456,26 @@
|
|
|
456
456
|
color: t.colorTextDescription
|
|
457
457
|
},
|
|
458
458
|
"data-testid": "preview-copy-path",
|
|
459
|
-
icon: (0, l.jsx)(
|
|
459
|
+
icon: (0, l.jsx)(f.A, {
|
|
460
460
|
size: 12,
|
|
461
461
|
strokeWidth: 2.5
|
|
462
462
|
}),
|
|
463
463
|
onClick: C
|
|
464
464
|
})
|
|
465
465
|
}),
|
|
466
|
-
(0, l.jsx)(
|
|
466
|
+
(0, l.jsx)(u.A, {
|
|
467
467
|
title: "Open in Editor",
|
|
468
468
|
mouseLeaveDelay: 0,
|
|
469
|
-
children: (0, l.jsx)(
|
|
469
|
+
children: (0, l.jsx)(p.Ay, {
|
|
470
470
|
type: "text",
|
|
471
471
|
size: "small",
|
|
472
472
|
className: "flex h-5 w-5 items-center justify-center rounded-md p-0 text-(--accents-4) hover:text-foreground hover:bg-(--accents-1) transition-all",
|
|
473
473
|
"data-testid": "preview-open-editor",
|
|
474
|
-
icon: (0, l.jsx)(
|
|
474
|
+
icon: (0, l.jsx)(x.A, {
|
|
475
475
|
size: 12,
|
|
476
476
|
strokeWidth: 2.5
|
|
477
477
|
}),
|
|
478
|
-
onClick: ()=>
|
|
478
|
+
onClick: ()=>g(s),
|
|
479
479
|
style: {
|
|
480
480
|
color: t.colorTextDescription
|
|
481
481
|
}
|
|
@@ -495,17 +495,17 @@
|
|
|
495
495
|
(0, l.jsxs)("div", {
|
|
496
496
|
className: "flex items-center gap-3 shrink-0",
|
|
497
497
|
children: [
|
|
498
|
-
a &&
|
|
498
|
+
a && n && (0, l.jsx)(B, {
|
|
499
499
|
token: t,
|
|
500
500
|
value: a,
|
|
501
|
-
onChange:
|
|
501
|
+
onChange: n
|
|
502
502
|
}),
|
|
503
|
-
d &&
|
|
503
|
+
d && b && (0, l.jsx)("div", {
|
|
504
504
|
className: "flex items-center rounded-md px-2 py-0.5 text-[10px] font-semibold tracking-wider transition-colors shrink-0",
|
|
505
505
|
style: {
|
|
506
|
-
backgroundColor: `var(--ds-${
|
|
507
|
-
color: `var(--ds-${
|
|
508
|
-
border: `1px solid var(--ds-${
|
|
506
|
+
backgroundColor: `var(--ds-${b}-100)`,
|
|
507
|
+
color: `var(--ds-${b}-900)`,
|
|
508
|
+
border: `1px solid var(--ds-${b}-300)`
|
|
509
509
|
},
|
|
510
510
|
children: d.label.toUpperCase()
|
|
511
511
|
})
|
|
@@ -514,22 +514,22 @@
|
|
|
514
514
|
]
|
|
515
515
|
});
|
|
516
516
|
};
|
|
517
|
-
var
|
|
518
|
-
let
|
|
519
|
-
let { className: t, style: s, direction: r = "horizontal", children: o, autoSaveId: a, ...i } = e,
|
|
517
|
+
var D = s(3938);
|
|
518
|
+
let G = (e)=>{
|
|
519
|
+
let { className: t, style: s, direction: r = "horizontal", children: o, autoSaveId: a, ...i } = e, c = n.Children.toArray(o).filter((e)=>n.isValidElement(e) && e.type === Z), d = n.useCallback(()=>{
|
|
520
520
|
if (!a) return null;
|
|
521
521
|
try {
|
|
522
522
|
let e = localStorage.getItem(a);
|
|
523
523
|
if (e) {
|
|
524
524
|
let t = JSON.parse(e);
|
|
525
|
-
if (Array.isArray(t) && t.length ===
|
|
525
|
+
if (Array.isArray(t) && t.length === c.length) return t;
|
|
526
526
|
}
|
|
527
527
|
} catch {}
|
|
528
528
|
return null;
|
|
529
529
|
}, [
|
|
530
530
|
a,
|
|
531
|
-
|
|
532
|
-
])(), u =
|
|
531
|
+
c.length
|
|
532
|
+
])(), u = c.map((e, t)=>{
|
|
533
533
|
let { defaultSize: s, minSize: l, maxSize: r, children: o } = e.props, a = d?.[t] ?? s;
|
|
534
534
|
return {
|
|
535
535
|
defaultSize: a ? `${a}%` : void 0,
|
|
@@ -537,14 +537,14 @@
|
|
|
537
537
|
max: r ? `${r}%` : void 0,
|
|
538
538
|
children: o
|
|
539
539
|
};
|
|
540
|
-
}), p =
|
|
540
|
+
}), p = n.useCallback((e)=>{
|
|
541
541
|
if (a) try {
|
|
542
542
|
localStorage.setItem(a, JSON.stringify(e));
|
|
543
543
|
} catch {}
|
|
544
544
|
}, [
|
|
545
545
|
a
|
|
546
546
|
]);
|
|
547
|
-
return (0, l.jsx)(
|
|
547
|
+
return (0, l.jsx)(D.A, {
|
|
548
548
|
layout: "horizontal" === r ? "horizontal" : "vertical",
|
|
549
549
|
className: t,
|
|
550
550
|
style: {
|
|
@@ -556,19 +556,19 @@
|
|
|
556
556
|
},
|
|
557
557
|
onResizeEnd: p,
|
|
558
558
|
...i,
|
|
559
|
-
children: u.map((e)=>(0, l.jsx)(
|
|
559
|
+
children: u.map((e)=>(0, l.jsx)(D.A.Panel, {
|
|
560
560
|
...e,
|
|
561
561
|
children: e.children
|
|
562
562
|
}, `panel-${e.defaultSize}-${e.min}-${e.max}`))
|
|
563
563
|
});
|
|
564
|
-
},
|
|
564
|
+
}, Z = (e)=>{
|
|
565
565
|
let { children: t } = e;
|
|
566
566
|
return (0, l.jsx)(l.Fragment, {
|
|
567
567
|
children: t
|
|
568
568
|
});
|
|
569
569
|
};
|
|
570
|
-
var
|
|
571
|
-
let
|
|
570
|
+
var L = s(8602), q = s(1572), H = s(3573);
|
|
571
|
+
let J = (e)=>(0, l.jsxs)("svg", {
|
|
572
572
|
xmlns: "http://www.w3.org/2000/svg",
|
|
573
573
|
fill: "none",
|
|
574
574
|
viewBox: "0 0 217 200",
|
|
@@ -1461,13 +1461,13 @@
|
|
|
1461
1461
|
]
|
|
1462
1462
|
})
|
|
1463
1463
|
]
|
|
1464
|
-
}),
|
|
1465
|
-
let { theme: t, onThemeToggle: s, isConnected: r, token: o, counts: a } = e, [i,
|
|
1466
|
-
(0,
|
|
1464
|
+
}), V = (e)=>{
|
|
1465
|
+
let { theme: t, onThemeToggle: s, isConnected: r, token: o, counts: a } = e, [i, c] = (0, n.useState)(0), d = (0, n.useRef)(a);
|
|
1466
|
+
(0, n.useEffect)(()=>{
|
|
1467
1467
|
let e = d.current;
|
|
1468
1468
|
if (e.pass !== a.pass || e.fail !== a.fail || e.running !== a.running) {
|
|
1469
1469
|
let e = setTimeout(()=>{
|
|
1470
|
-
|
|
1470
|
+
c((e)=>e + 1);
|
|
1471
1471
|
}, 100);
|
|
1472
1472
|
return ()=>clearTimeout(e);
|
|
1473
1473
|
}
|
|
@@ -1475,10 +1475,10 @@
|
|
|
1475
1475
|
}, [
|
|
1476
1476
|
a
|
|
1477
1477
|
]);
|
|
1478
|
-
let
|
|
1479
|
-
system:
|
|
1480
|
-
light:
|
|
1481
|
-
dark:
|
|
1478
|
+
let h = a.idle + a.running + a.pass + a.fail + a.skip, f = (e)=>0 === h ? 0 : e / h * 100, x = f(a.pass), m = f(a.fail), g = f(a.running), j = {
|
|
1479
|
+
system: L.A,
|
|
1480
|
+
light: q.A,
|
|
1481
|
+
dark: H.A
|
|
1482
1482
|
}[t];
|
|
1483
1483
|
return (0, l.jsxs)("div", {
|
|
1484
1484
|
className: "relative flex h-[48px] items-center justify-between px-4",
|
|
@@ -1490,7 +1490,7 @@
|
|
|
1490
1490
|
(0, l.jsxs)("div", {
|
|
1491
1491
|
className: "flex items-center gap-2",
|
|
1492
1492
|
children: [
|
|
1493
|
-
(0, l.jsx)(
|
|
1493
|
+
(0, l.jsx)(J, {
|
|
1494
1494
|
className: "h-6 transition-all"
|
|
1495
1495
|
}),
|
|
1496
1496
|
(0, l.jsxs)("div", {
|
|
@@ -1511,7 +1511,7 @@
|
|
|
1511
1511
|
(0, l.jsxs)("div", {
|
|
1512
1512
|
className: "flex items-center gap-3",
|
|
1513
1513
|
children: [
|
|
1514
|
-
(0, l.jsx)(
|
|
1514
|
+
(0, l.jsx)(u.A, {
|
|
1515
1515
|
title: r ? "Connected" : "Connecting...",
|
|
1516
1516
|
mouseLeaveDelay: 0,
|
|
1517
1517
|
children: (0, l.jsx)("span", {
|
|
@@ -1521,14 +1521,14 @@
|
|
|
1521
1521
|
}
|
|
1522
1522
|
})
|
|
1523
1523
|
}),
|
|
1524
|
-
(0, l.jsx)(
|
|
1524
|
+
(0, l.jsx)(u.A, {
|
|
1525
1525
|
title: {
|
|
1526
1526
|
system: "Theme: System",
|
|
1527
1527
|
light: "Theme: Light",
|
|
1528
1528
|
dark: "Theme: Dark"
|
|
1529
1529
|
}[t],
|
|
1530
1530
|
mouseLeaveDelay: 0,
|
|
1531
|
-
children: (0, l.jsx)(
|
|
1531
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1532
1532
|
type: "text",
|
|
1533
1533
|
size: "small",
|
|
1534
1534
|
className: "flex h-8 w-8 items-center justify-center rounded-md p-0",
|
|
@@ -1585,8 +1585,8 @@
|
|
|
1585
1585
|
]
|
|
1586
1586
|
});
|
|
1587
1587
|
};
|
|
1588
|
-
var
|
|
1589
|
-
let
|
|
1588
|
+
var X = s(7778), K = s(6946), Y = s(6765), Q = s(6822), ee = s(8946), et = s(9885);
|
|
1589
|
+
let es = (0, n.memo)((e)=>{
|
|
1590
1590
|
let { counts: t, isRunning: s } = e, r = s && 0 === t.running;
|
|
1591
1591
|
return (0, l.jsx)("div", {
|
|
1592
1592
|
className: "flex h-6 cursor-default select-none items-center",
|
|
@@ -1610,7 +1610,7 @@
|
|
|
1610
1610
|
}
|
|
1611
1611
|
].map((e)=>{
|
|
1612
1612
|
let s = t[e.key] || 0, o = "running" === e.key;
|
|
1613
|
-
return (0, l.jsxs)(
|
|
1613
|
+
return (0, l.jsxs)(et.A, {
|
|
1614
1614
|
className: `m-0 flex items-center gap-1 px-2 py-0 border-0 ${o && r ? "animate-pulse" : ""}`,
|
|
1615
1615
|
style: {
|
|
1616
1616
|
display: "flex",
|
|
@@ -1644,7 +1644,7 @@
|
|
|
1644
1644
|
})
|
|
1645
1645
|
})
|
|
1646
1646
|
});
|
|
1647
|
-
}),
|
|
1647
|
+
}), el = (e)=>{
|
|
1648
1648
|
let { token: t, filterText: s, onFilterChange: r, isAllExpanded: o, onToggleExpandAll: a, onRerun: i, counts: n, isRunning: c } = e;
|
|
1649
1649
|
return (0, l.jsxs)("div", {
|
|
1650
1650
|
className: "flex flex-col gap-3 px-4 py-3",
|
|
@@ -1657,7 +1657,7 @@
|
|
|
1657
1657
|
className: "flex items-center justify-between",
|
|
1658
1658
|
children: [
|
|
1659
1659
|
(0, l.jsx)("div", {
|
|
1660
|
-
children: (0, l.jsx)(
|
|
1660
|
+
children: (0, l.jsx)(es, {
|
|
1661
1661
|
counts: n,
|
|
1662
1662
|
isRunning: c
|
|
1663
1663
|
})
|
|
@@ -1665,16 +1665,16 @@
|
|
|
1665
1665
|
(0, l.jsxs)("div", {
|
|
1666
1666
|
className: "flex items-center gap-1",
|
|
1667
1667
|
children: [
|
|
1668
|
-
(0, l.jsx)(
|
|
1668
|
+
(0, l.jsx)(u.A, {
|
|
1669
1669
|
title: o ? "Collapse all" : "Expand all",
|
|
1670
1670
|
mouseLeaveDelay: 0,
|
|
1671
|
-
children: (0, l.jsx)(
|
|
1671
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1672
1672
|
type: "text",
|
|
1673
1673
|
size: "small",
|
|
1674
|
-
icon: o ? (0, l.jsx)(
|
|
1674
|
+
icon: o ? (0, l.jsx)(K.A, {
|
|
1675
1675
|
size: 13,
|
|
1676
1676
|
strokeWidth: 2.5
|
|
1677
|
-
}) : (0, l.jsx)(
|
|
1677
|
+
}) : (0, l.jsx)(Y.A, {
|
|
1678
1678
|
size: 13,
|
|
1679
1679
|
strokeWidth: 2.5
|
|
1680
1680
|
}),
|
|
@@ -1686,13 +1686,13 @@
|
|
|
1686
1686
|
}
|
|
1687
1687
|
})
|
|
1688
1688
|
}),
|
|
1689
|
-
(0, l.jsx)(
|
|
1689
|
+
(0, l.jsx)(u.A, {
|
|
1690
1690
|
title: "Re-run all tests",
|
|
1691
1691
|
mouseLeaveDelay: 0,
|
|
1692
|
-
children: (0, l.jsx)(
|
|
1692
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1693
1693
|
type: "text",
|
|
1694
1694
|
size: "small",
|
|
1695
|
-
icon: (0, l.jsx)(
|
|
1695
|
+
icon: (0, l.jsx)(Q.A, {
|
|
1696
1696
|
size: 15,
|
|
1697
1697
|
strokeWidth: 2.5
|
|
1698
1698
|
}),
|
|
@@ -1709,9 +1709,9 @@
|
|
|
1709
1709
|
})
|
|
1710
1710
|
]
|
|
1711
1711
|
}),
|
|
1712
|
-
(0, l.jsx)(
|
|
1712
|
+
(0, l.jsx)(X.A, {
|
|
1713
1713
|
placeholder: "Search tests...",
|
|
1714
|
-
prefix: (0, l.jsx)(
|
|
1714
|
+
prefix: (0, l.jsx)(ee.A, {
|
|
1715
1715
|
size: 14,
|
|
1716
1716
|
strokeWidth: 2.5,
|
|
1717
1717
|
className: "opacity-40"
|
|
@@ -1725,14 +1725,18 @@
|
|
|
1725
1725
|
]
|
|
1726
1726
|
});
|
|
1727
1727
|
};
|
|
1728
|
-
var
|
|
1729
|
-
let ed =
|
|
1728
|
+
var er = s(7944), eo = s(5119), ea = s(9886), ei = s(640), en = s(7094);
|
|
1729
|
+
let ec = (e)=>`__project__${e}`, ed = (e, t)=>`${e}::suite::${t.join("::")}`, eu = (e, t)=>{
|
|
1730
|
+
let s = e;
|
|
1731
|
+
for(let e = 1; e <= t.length; e++)s = ed(s, t.slice(0, e));
|
|
1732
|
+
return s;
|
|
1733
|
+
}, ep = (e, t)=>`${e}::case::${t}`, eh = [
|
|
1730
1734
|
"pass",
|
|
1731
1735
|
"fail",
|
|
1732
1736
|
"skip"
|
|
1733
|
-
],
|
|
1734
|
-
let { icon: t, iconColor: s, status: r, label: o, caseId: a, onRerun: i, buttonTextColor:
|
|
1735
|
-
return (0,
|
|
1737
|
+
], ef = (e)=>{
|
|
1738
|
+
let { icon: t, iconColor: s, status: r, label: o, caseId: a, onRerun: i, buttonTextColor: c } = e, d = (0, n.useRef)(null), [h, f] = (0, n.useState)(0), x = eh.includes(r);
|
|
1739
|
+
return (0, n.useEffect)(()=>{
|
|
1736
1740
|
x && null !== d.current && d.current !== r && f((e)=>e + 1), d.current = r;
|
|
1737
1741
|
}, [
|
|
1738
1742
|
r,
|
|
@@ -1743,13 +1747,13 @@
|
|
|
1743
1747
|
"data-test-case": a,
|
|
1744
1748
|
children: [
|
|
1745
1749
|
t && (0, l.jsx)("span", {
|
|
1746
|
-
className: `flex w-[16px] shrink-0 items-center justify-center ${
|
|
1750
|
+
className: `flex w-[16px] shrink-0 items-center justify-center ${h > 0 ? "status-icon-flash" : ""}`,
|
|
1747
1751
|
style: {
|
|
1748
1752
|
color: s
|
|
1749
1753
|
},
|
|
1750
1754
|
children: t
|
|
1751
|
-
},
|
|
1752
|
-
(0, l.jsx)(
|
|
1755
|
+
}, h),
|
|
1756
|
+
(0, l.jsx)(u.A, {
|
|
1753
1757
|
title: o,
|
|
1754
1758
|
mouseLeaveDelay: 0,
|
|
1755
1759
|
children: (0, l.jsx)("span", {
|
|
@@ -1759,13 +1763,13 @@
|
|
|
1759
1763
|
}),
|
|
1760
1764
|
(0, l.jsx)("div", {
|
|
1761
1765
|
className: "opacity-0 transition-opacity duration-200 group-hover:opacity-100",
|
|
1762
|
-
children: (0, l.jsx)(
|
|
1766
|
+
children: (0, l.jsx)(u.A, {
|
|
1763
1767
|
title: "Re-run this test",
|
|
1764
1768
|
mouseLeaveDelay: 0,
|
|
1765
|
-
children: (0, l.jsx)(
|
|
1769
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1766
1770
|
type: "text",
|
|
1767
1771
|
size: "small",
|
|
1768
|
-
icon: (0, l.jsx)(
|
|
1772
|
+
icon: (0, l.jsx)(Q.A, {
|
|
1769
1773
|
size: 14,
|
|
1770
1774
|
strokeWidth: 2.5
|
|
1771
1775
|
}),
|
|
@@ -1776,20 +1780,20 @@
|
|
|
1776
1780
|
className: "inline-flex h-5 w-5 items-center justify-center p-0",
|
|
1777
1781
|
"data-testid": "test-case-rerun",
|
|
1778
1782
|
style: {
|
|
1779
|
-
color:
|
|
1783
|
+
color: c
|
|
1780
1784
|
}
|
|
1781
1785
|
})
|
|
1782
1786
|
})
|
|
1783
1787
|
})
|
|
1784
1788
|
]
|
|
1785
1789
|
});
|
|
1786
|
-
},
|
|
1790
|
+
}, ex = [
|
|
1787
1791
|
"pass",
|
|
1788
1792
|
"fail"
|
|
1789
|
-
],
|
|
1790
|
-
let { icon: t, iconColor: s, status: r, relativePath: o, filePath: a, onOpen: i, onRerun:
|
|
1791
|
-
return (0,
|
|
1792
|
-
g && null !==
|
|
1793
|
+
], em = (e)=>{
|
|
1794
|
+
let { icon: t, iconColor: s, status: r, relativePath: o, filePath: a, onOpen: i, onRerun: c, textColor: d } = e, h = (0, n.useRef)(null), [f, m] = (0, n.useState)(0), g = ex.includes(r);
|
|
1795
|
+
return (0, n.useEffect)(()=>{
|
|
1796
|
+
g && null !== h.current && h.current !== r && m((e)=>e + 1), h.current = r;
|
|
1793
1797
|
}, [
|
|
1794
1798
|
r,
|
|
1795
1799
|
g
|
|
@@ -1805,7 +1809,7 @@
|
|
|
1805
1809
|
},
|
|
1806
1810
|
children: t
|
|
1807
1811
|
}, f),
|
|
1808
|
-
(0, l.jsx)(
|
|
1812
|
+
(0, l.jsx)(u.A, {
|
|
1809
1813
|
title: o,
|
|
1810
1814
|
styles: {
|
|
1811
1815
|
container: {
|
|
@@ -1822,13 +1826,13 @@
|
|
|
1822
1826
|
(0, l.jsxs)("div", {
|
|
1823
1827
|
className: "flex items-center gap-1 opacity-0 transition-opacity duration-200 group-hover:opacity-100",
|
|
1824
1828
|
children: [
|
|
1825
|
-
(0, l.jsx)(
|
|
1829
|
+
(0, l.jsx)(u.A, {
|
|
1826
1830
|
title: "Open in editor",
|
|
1827
1831
|
mouseLeaveDelay: 0,
|
|
1828
|
-
children: (0, l.jsx)(
|
|
1832
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1829
1833
|
type: "text",
|
|
1830
1834
|
size: "small",
|
|
1831
|
-
icon: (0, l.jsx)(
|
|
1835
|
+
icon: (0, l.jsx)(x.A, {
|
|
1832
1836
|
size: 14,
|
|
1833
1837
|
strokeWidth: 2.5
|
|
1834
1838
|
}),
|
|
@@ -1842,19 +1846,19 @@
|
|
|
1842
1846
|
}
|
|
1843
1847
|
})
|
|
1844
1848
|
}),
|
|
1845
|
-
(0, l.jsx)(
|
|
1849
|
+
(0, l.jsx)(u.A, {
|
|
1846
1850
|
title: "Re-run this file",
|
|
1847
1851
|
mouseLeaveDelay: 0,
|
|
1848
|
-
children: (0, l.jsx)(
|
|
1852
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1849
1853
|
type: "text",
|
|
1850
1854
|
size: "small",
|
|
1851
|
-
icon: (0, l.jsx)(
|
|
1855
|
+
icon: (0, l.jsx)(Q.A, {
|
|
1852
1856
|
size: 14,
|
|
1853
1857
|
strokeWidth: 2.5
|
|
1854
1858
|
}),
|
|
1855
|
-
disabled: !
|
|
1859
|
+
disabled: !c,
|
|
1856
1860
|
onClick: (e)=>{
|
|
1857
|
-
e.stopPropagation(),
|
|
1861
|
+
e.stopPropagation(), c?.();
|
|
1858
1862
|
},
|
|
1859
1863
|
className: "inline-flex h-5 w-5 items-center justify-center p-0",
|
|
1860
1864
|
"data-testid": "test-file-rerun",
|
|
@@ -1867,13 +1871,13 @@
|
|
|
1867
1871
|
})
|
|
1868
1872
|
]
|
|
1869
1873
|
});
|
|
1870
|
-
},
|
|
1874
|
+
}, eg = [
|
|
1871
1875
|
"pass",
|
|
1872
1876
|
"fail",
|
|
1873
1877
|
"skip"
|
|
1874
|
-
],
|
|
1875
|
-
let { icon: t, iconColor: s, status: r, name: o, fullName: a, onRerun: i, buttonTextColor:
|
|
1876
|
-
return (0,
|
|
1878
|
+
], ej = (e)=>{
|
|
1879
|
+
let { icon: t, iconColor: s, status: r, name: o, fullName: a, onRerun: i, buttonTextColor: c } = e, d = (0, n.useRef)(null), [h, f] = (0, n.useState)(0), x = eg.includes(r);
|
|
1880
|
+
return (0, n.useEffect)(()=>{
|
|
1877
1881
|
x && null !== d.current && d.current !== r && f((e)=>e + 1), d.current = r;
|
|
1878
1882
|
}, [
|
|
1879
1883
|
r,
|
|
@@ -1884,13 +1888,13 @@
|
|
|
1884
1888
|
"data-test-suite": a,
|
|
1885
1889
|
children: [
|
|
1886
1890
|
t && (0, l.jsx)("span", {
|
|
1887
|
-
className: `flex w-[16px] shrink-0 items-center justify-center ${
|
|
1891
|
+
className: `flex w-[16px] shrink-0 items-center justify-center ${h > 0 ? "status-icon-flash" : ""}`,
|
|
1888
1892
|
style: {
|
|
1889
1893
|
color: s
|
|
1890
1894
|
},
|
|
1891
1895
|
children: t
|
|
1892
|
-
},
|
|
1893
|
-
(0, l.jsx)(
|
|
1896
|
+
}, h),
|
|
1897
|
+
(0, l.jsx)(u.A, {
|
|
1894
1898
|
title: o,
|
|
1895
1899
|
mouseLeaveDelay: 0,
|
|
1896
1900
|
children: (0, l.jsx)("span", {
|
|
@@ -1900,13 +1904,13 @@
|
|
|
1900
1904
|
}),
|
|
1901
1905
|
(0, l.jsx)("div", {
|
|
1902
1906
|
className: "opacity-0 transition-opacity duration-200 group-hover:opacity-100",
|
|
1903
|
-
children: (0, l.jsx)(
|
|
1907
|
+
children: (0, l.jsx)(u.A, {
|
|
1904
1908
|
title: "Re-run this suite",
|
|
1905
1909
|
mouseLeaveDelay: 0,
|
|
1906
|
-
children: (0, l.jsx)(
|
|
1910
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1907
1911
|
type: "text",
|
|
1908
1912
|
size: "small",
|
|
1909
|
-
icon: (0, l.jsx)(
|
|
1913
|
+
icon: (0, l.jsx)(Q.A, {
|
|
1910
1914
|
size: 14,
|
|
1911
1915
|
strokeWidth: 2.5
|
|
1912
1916
|
}),
|
|
@@ -1917,15 +1921,15 @@
|
|
|
1917
1921
|
className: "inline-flex h-5 w-5 items-center justify-center p-0",
|
|
1918
1922
|
"data-testid": "test-suite-rerun",
|
|
1919
1923
|
style: {
|
|
1920
|
-
color:
|
|
1924
|
+
color: c
|
|
1921
1925
|
}
|
|
1922
1926
|
})
|
|
1923
1927
|
})
|
|
1924
1928
|
})
|
|
1925
1929
|
]
|
|
1926
1930
|
});
|
|
1927
|
-
},
|
|
1928
|
-
let { testFiles: t, statusMap: s, caseMap: r, rootPath: o, projects: a, loading: i, connected:
|
|
1931
|
+
}, ev = (e)=>{
|
|
1932
|
+
let { testFiles: t, statusMap: s, caseMap: r, rootPath: o, projects: a, loading: i, connected: c, openFiles: d, activeFile: u, token: p, filterText: h, onExpandChange: f, onSelect: x, onRerunFile: j, onRerunTestCase: v } = e, { filteredTestFiles: y, filteredCaseMap: _ } = (0, n.useMemo)(()=>{
|
|
1929
1933
|
if (!h.trim()) return {
|
|
1930
1934
|
filteredTestFiles: t,
|
|
1931
1935
|
filteredCaseMap: r
|
|
@@ -1944,7 +1948,7 @@
|
|
|
1944
1948
|
t,
|
|
1945
1949
|
r,
|
|
1946
1950
|
h
|
|
1947
|
-
]), C = (0,
|
|
1951
|
+
]), C = (0, n.useCallback)((e, t)=>{
|
|
1948
1952
|
if (0 === t.length) return [
|
|
1949
1953
|
{
|
|
1950
1954
|
key: `${e}::__empty`,
|
|
@@ -1985,16 +1989,16 @@
|
|
|
1985
1989
|
}, o = (t, s)=>{
|
|
1986
1990
|
let a = [];
|
|
1987
1991
|
for (let i of t.children.values()){
|
|
1988
|
-
let t = r(i),
|
|
1992
|
+
let t = r(i), n = b[t], d = ed(s, i.fullPath), u = i.fullPath.join(" ");
|
|
1989
1993
|
a.push({
|
|
1990
1994
|
key: d,
|
|
1991
|
-
title: (0, l.jsx)(
|
|
1992
|
-
icon:
|
|
1993
|
-
iconColor:
|
|
1995
|
+
title: (0, l.jsx)(ej, {
|
|
1996
|
+
icon: n.icon,
|
|
1997
|
+
iconColor: n.color,
|
|
1994
1998
|
status: t,
|
|
1995
1999
|
name: i.name,
|
|
1996
2000
|
fullName: u,
|
|
1997
|
-
onRerun:
|
|
2001
|
+
onRerun: c ? ()=>{
|
|
1998
2002
|
v(e, u);
|
|
1999
2003
|
} : void 0,
|
|
2000
2004
|
buttonTextColor: p.colorTextSecondary
|
|
@@ -2004,16 +2008,16 @@
|
|
|
2004
2008
|
});
|
|
2005
2009
|
}
|
|
2006
2010
|
for (let r of t.cases){
|
|
2007
|
-
let t =
|
|
2011
|
+
let t = b[r.status];
|
|
2008
2012
|
a.push({
|
|
2009
|
-
key:
|
|
2010
|
-
title: (0, l.jsx)(
|
|
2013
|
+
key: ep(s, r.id),
|
|
2014
|
+
title: (0, l.jsx)(ef, {
|
|
2011
2015
|
icon: t.icon,
|
|
2012
2016
|
iconColor: t.color,
|
|
2013
2017
|
status: r.status,
|
|
2014
2018
|
label: r.name,
|
|
2015
2019
|
caseId: r.id,
|
|
2016
|
-
onRerun:
|
|
2020
|
+
onRerun: c ? ()=>{
|
|
2017
2021
|
v(e, r.fullName);
|
|
2018
2022
|
} : void 0,
|
|
2019
2023
|
buttonTextColor: p.colorTextSecondary
|
|
@@ -2026,27 +2030,27 @@
|
|
|
2026
2030
|
};
|
|
2027
2031
|
return o(s, e);
|
|
2028
2032
|
}, [
|
|
2029
|
-
|
|
2033
|
+
c,
|
|
2030
2034
|
v,
|
|
2031
2035
|
p.colorTextSecondary
|
|
2032
|
-
]),
|
|
2036
|
+
]), k = (0, n.useMemo)(()=>{
|
|
2033
2037
|
let e = [
|
|
2034
2038
|
...new Set(y.map((e)=>e.projectName))
|
|
2035
2039
|
], t = new Map;
|
|
2036
2040
|
for (let e of a)t.set(e.name, e.projectRoot);
|
|
2037
2041
|
let r = (e, t)=>{
|
|
2038
|
-
let r = e.testPath, a = s[r] ?? "idle", i =
|
|
2042
|
+
let r = e.testPath, a = s[r] ?? "idle", i = w[a], n = m(r, t ?? o), d = Object.values(_[r] ?? {});
|
|
2039
2043
|
return {
|
|
2040
2044
|
key: r,
|
|
2041
|
-
title: (0, l.jsx)(
|
|
2045
|
+
title: (0, l.jsx)(em, {
|
|
2042
2046
|
icon: i.icon,
|
|
2043
2047
|
iconColor: i.color,
|
|
2044
2048
|
status: a,
|
|
2045
|
-
relativePath:
|
|
2049
|
+
relativePath: n,
|
|
2046
2050
|
filePath: r,
|
|
2047
|
-
onOpen: ()=>
|
|
2048
|
-
onRerun:
|
|
2049
|
-
|
|
2051
|
+
onOpen: ()=>g(r),
|
|
2052
|
+
onRerun: c ? ()=>{
|
|
2053
|
+
j(r);
|
|
2050
2054
|
} : void 0,
|
|
2051
2055
|
textColor: p.colorTextSecondary
|
|
2052
2056
|
}),
|
|
@@ -2054,9 +2058,9 @@
|
|
|
2054
2058
|
};
|
|
2055
2059
|
};
|
|
2056
2060
|
return e.length > 1 ? e.map((e)=>{
|
|
2057
|
-
let o = y.filter((t)=>t.projectName === e), a =
|
|
2061
|
+
let o = y.filter((t)=>t.projectName === e), a = ec(e), i = t.get(e), n = o.map((e)=>s[e.testPath] ?? "idle"), c = "idle";
|
|
2058
2062
|
n.some((e)=>"fail" === e) ? c = "fail" : n.some((e)=>"running" === e) ? c = "running" : n.length > 0 && n.every((e)=>"pass" === e) && (c = "pass");
|
|
2059
|
-
let d =
|
|
2063
|
+
let d = w[c];
|
|
2060
2064
|
return {
|
|
2061
2065
|
key: a,
|
|
2062
2066
|
title: (0, l.jsxs)("div", {
|
|
@@ -2064,7 +2068,7 @@
|
|
|
2064
2068
|
"data-testid": "test-project-title",
|
|
2065
2069
|
"data-test-project": e,
|
|
2066
2070
|
children: [
|
|
2067
|
-
(0, l.jsx)(
|
|
2071
|
+
(0, l.jsx)(ea.A, {
|
|
2068
2072
|
size: 14,
|
|
2069
2073
|
style: {
|
|
2070
2074
|
color: d.color
|
|
@@ -2088,8 +2092,8 @@
|
|
|
2088
2092
|
}, [
|
|
2089
2093
|
C,
|
|
2090
2094
|
_,
|
|
2091
|
-
|
|
2092
|
-
|
|
2095
|
+
c,
|
|
2096
|
+
j,
|
|
2093
2097
|
a,
|
|
2094
2098
|
o,
|
|
2095
2099
|
s,
|
|
@@ -2105,12 +2109,12 @@
|
|
|
2105
2109
|
].map((e)=>(0, l.jsxs)("div", {
|
|
2106
2110
|
className: "flex items-center gap-2",
|
|
2107
2111
|
children: [
|
|
2108
|
-
(0, l.jsx)(
|
|
2112
|
+
(0, l.jsx)(er.A.Avatar, {
|
|
2109
2113
|
active: !0,
|
|
2110
2114
|
size: "small",
|
|
2111
2115
|
shape: "circle"
|
|
2112
2116
|
}),
|
|
2113
|
-
(0, l.jsx)(
|
|
2117
|
+
(0, l.jsx)(er.A.Input, {
|
|
2114
2118
|
active: !0,
|
|
2115
2119
|
size: "small",
|
|
2116
2120
|
style: {
|
|
@@ -2119,7 +2123,7 @@
|
|
|
2119
2123
|
})
|
|
2120
2124
|
]
|
|
2121
2125
|
}, e))
|
|
2122
|
-
}) :
|
|
2126
|
+
}) : c ? 0 === t.length ? (0, l.jsx)("div", {
|
|
2123
2127
|
className: "flex h-full items-center justify-center",
|
|
2124
2128
|
children: (0, l.jsx)("span", {
|
|
2125
2129
|
className: "text-(--muted-foreground)",
|
|
@@ -2131,14 +2135,14 @@
|
|
|
2131
2135
|
className: "text-(--muted-foreground)",
|
|
2132
2136
|
children: "No matching tests found"
|
|
2133
2137
|
})
|
|
2134
|
-
}) : (0, l.jsx)(
|
|
2138
|
+
}) : (0, l.jsx)(eo.A, {
|
|
2135
2139
|
blockNode: !0,
|
|
2136
2140
|
"data-testid": "test-files-tree",
|
|
2137
2141
|
showLine: !1,
|
|
2138
|
-
switcherIcon: (e)=>e.expanded ? (0, l.jsx)(
|
|
2142
|
+
switcherIcon: (e)=>e.expanded ? (0, l.jsx)(ei.A, {
|
|
2139
2143
|
size: 12,
|
|
2140
2144
|
strokeWidth: 2.5
|
|
2141
|
-
}) : (0, l.jsx)(
|
|
2145
|
+
}) : (0, l.jsx)(en.A, {
|
|
2142
2146
|
size: 12,
|
|
2143
2147
|
strokeWidth: 2.5
|
|
2144
2148
|
}),
|
|
@@ -2153,7 +2157,7 @@
|
|
|
2153
2157
|
let s = t.node.key, l = y.map((e)=>e.testPath);
|
|
2154
2158
|
"string" == typeof s && l.includes(s) && x(s);
|
|
2155
2159
|
},
|
|
2156
|
-
treeData:
|
|
2160
|
+
treeData: k,
|
|
2157
2161
|
className: "bg-transparent",
|
|
2158
2162
|
style: {
|
|
2159
2163
|
marginLeft: "16px"
|
|
@@ -2165,7 +2169,7 @@
|
|
|
2165
2169
|
children: "Reconnecting..."
|
|
2166
2170
|
})
|
|
2167
2171
|
});
|
|
2168
|
-
},
|
|
2172
|
+
}, ey = (e, t)=>Number.isFinite(e) && e > 0 && Number.isFinite(t) && t > 0, e_ = (e)=>{
|
|
2169
2173
|
if (!e) return {
|
|
2170
2174
|
mode: "full"
|
|
2171
2175
|
};
|
|
@@ -2176,7 +2180,7 @@
|
|
|
2176
2180
|
};
|
|
2177
2181
|
if ("object" == typeof e) {
|
|
2178
2182
|
let t = Number(e.width), s = Number(e.height);
|
|
2179
|
-
if (
|
|
2183
|
+
if (ey(t, s)) return {
|
|
2180
2184
|
mode: "responsive",
|
|
2181
2185
|
width: t,
|
|
2182
2186
|
height: s
|
|
@@ -2185,14 +2189,14 @@
|
|
|
2185
2189
|
return {
|
|
2186
2190
|
mode: "full"
|
|
2187
2191
|
};
|
|
2188
|
-
},
|
|
2189
|
-
let { token: t, selection: s, active: r, onResponsiveResize: o, children: a, ...i } = e,
|
|
2192
|
+
}, eC = (e, t, s)=>Math.min(s, Math.max(t, e)), ew = (e)=>{
|
|
2193
|
+
let { token: t, selection: s, active: r, onResponsiveResize: o, children: a, ...i } = e, c = (0, n.useRef)(null), d = ((e)=>{
|
|
2190
2194
|
if ("full" === e.mode) return null;
|
|
2191
2195
|
if ("responsive" === e.mode) return {
|
|
2192
2196
|
width: e.width,
|
|
2193
2197
|
height: e.height
|
|
2194
2198
|
};
|
|
2195
|
-
let t =
|
|
2199
|
+
let t = $(e.preset);
|
|
2196
2200
|
return "landscape" === e.orientation ? {
|
|
2197
2201
|
width: t.height,
|
|
2198
2202
|
height: t.width
|
|
@@ -2201,9 +2205,9 @@
|
|
|
2201
2205
|
height: t.height
|
|
2202
2206
|
};
|
|
2203
2207
|
})(s);
|
|
2204
|
-
return ((0,
|
|
2208
|
+
return ((0, n.useLayoutEffect)(()=>{
|
|
2205
2209
|
if (!r || "responsive" !== s.mode || !o) return;
|
|
2206
|
-
let e =
|
|
2210
|
+
let e = c.current;
|
|
2207
2211
|
if (!e) return;
|
|
2208
2212
|
let t = !0, l = new ResizeObserver((e)=>{
|
|
2209
2213
|
let l = e[0]?.contentRect;
|
|
@@ -2213,7 +2217,7 @@
|
|
|
2213
2217
|
return;
|
|
2214
2218
|
}
|
|
2215
2219
|
if (l.width <= 0 || l.height <= 0) return;
|
|
2216
|
-
let r =
|
|
2220
|
+
let r = eC(Math.round(l.width), 1, 1e4), a = eC(Math.round(l.height), 1, 1e4);
|
|
2217
2221
|
(r !== s.width || a !== s.height) && o({
|
|
2218
2222
|
width: r,
|
|
2219
2223
|
height: a
|
|
@@ -2227,7 +2231,7 @@
|
|
|
2227
2231
|
]), d) ? (0, l.jsx)("div", {
|
|
2228
2232
|
className: "flex h-full w-full items-start justify-center p-4 overflow-auto",
|
|
2229
2233
|
children: (0, l.jsx)("div", {
|
|
2230
|
-
ref:
|
|
2234
|
+
ref: c,
|
|
2231
2235
|
className: "shrink-0 relative group",
|
|
2232
2236
|
style: {
|
|
2233
2237
|
width: d.width,
|
|
@@ -2254,7 +2258,7 @@
|
|
|
2254
2258
|
...i,
|
|
2255
2259
|
children: a
|
|
2256
2260
|
});
|
|
2257
|
-
},
|
|
2261
|
+
}, eb = (e)=>"object" == typeof e && null !== e, ek = (e, t)=>"string" == typeof e[t], eS = (e)=>{
|
|
2258
2262
|
let { filePath: t, test: s, status: l, previousCase: r } = e, o = (s.parentNames ?? []).filter(Boolean), a = [
|
|
2259
2263
|
...o,
|
|
2260
2264
|
s.name
|
|
@@ -2268,7 +2272,7 @@
|
|
|
2268
2272
|
filePath: s.testPath || r?.filePath || t,
|
|
2269
2273
|
location: s.location ?? r?.location
|
|
2270
2274
|
};
|
|
2271
|
-
},
|
|
2275
|
+
}, eF = (e)=>"object" == typeof e && null !== e && "requestId" in e && "string" == typeof e.requestId ? e.requestId : "unknown-request", eN = async (e, t, s)=>{
|
|
2272
2276
|
if (null === s || "function" != typeof s.postMessage) return;
|
|
2273
2277
|
let l = (e)=>{
|
|
2274
2278
|
s.postMessage({
|
|
@@ -2276,8 +2280,8 @@
|
|
|
2276
2280
|
payload: e
|
|
2277
2281
|
}, "*");
|
|
2278
2282
|
};
|
|
2279
|
-
if ("unknown-request" ===
|
|
2280
|
-
requestId:
|
|
2283
|
+
if ("unknown-request" === eF(t)) return void l({
|
|
2284
|
+
requestId: eF(t),
|
|
2281
2285
|
error: "Invalid dispatch request payload: expected an object with string requestId."
|
|
2282
2286
|
});
|
|
2283
2287
|
if (!e) return void l({
|
|
@@ -2292,37 +2296,37 @@
|
|
|
2292
2296
|
error: e instanceof Error ? e.message : String(e)
|
|
2293
2297
|
});
|
|
2294
2298
|
}
|
|
2295
|
-
},
|
|
2299
|
+
}, eA = [
|
|
2296
2300
|
1e3,
|
|
2297
2301
|
2e3,
|
|
2298
2302
|
4e3,
|
|
2299
2303
|
8e3,
|
|
2300
2304
|
16e3,
|
|
2301
2305
|
3e4
|
|
2302
|
-
],
|
|
2306
|
+
], eP = function(e, t, s) {
|
|
2303
2307
|
let l = arguments.length > 3 && void 0 !== arguments[3] && arguments[3], r = arguments.length > 4 ? arguments[4] : void 0, o = new URL("/runner.html", t || window.location.origin);
|
|
2304
2308
|
return o.searchParams.set("testFile", e), s && o.searchParams.set("testNamePattern", s), r && o.searchParams.set("runId", r), l && o.searchParams.set("t", Date.now().toString()), o.toString();
|
|
2305
2309
|
};
|
|
2306
|
-
var
|
|
2307
|
-
let
|
|
2310
|
+
var eM = s(5999);
|
|
2311
|
+
let ez = function() {
|
|
2308
2312
|
for(var e = arguments.length, t = Array(e), s = 0; s < e; s++)t[s] = arguments[s];
|
|
2309
2313
|
window.__RSTEST_BROWSER_OPTIONS__?.debug === !0 && console.log(...t);
|
|
2310
|
-
},
|
|
2314
|
+
}, eO = (e)=>{
|
|
2311
2315
|
try {
|
|
2312
2316
|
return new URL(e.src, window.location.href).searchParams.get("runId") ?? void 0;
|
|
2313
2317
|
} catch {
|
|
2314
2318
|
return;
|
|
2315
2319
|
}
|
|
2316
|
-
},
|
|
2317
|
-
let { options: t, theme: s, setTheme:
|
|
2320
|
+
}, eR = (e)=>Array.from(document.querySelectorAll("iframe[data-test-file]")).find((t)=>t.dataset.testFile === e), eE = (e)=>{
|
|
2321
|
+
let { options: t, theme: s, setTheme: a } = e, { token: i } = o.A.useToken(), [c, u] = (0, n.useState)([]), [p, h] = (0, n.useState)(null), [f, x] = (0, n.useState)({}), [m, g] = (0, n.useState)({}), [j, v] = (0, n.useState)([]), [y, _] = (0, n.useState)(""), [C, w] = (0, n.useState)({}), b = (0, n.useCallback)((e)=>{
|
|
2318
2322
|
let s = 5381;
|
|
2319
2323
|
for(let e = 0; e < t.rootPath.length; e++)s = 33 * s ^ t.rootPath.charCodeAt(e);
|
|
2320
2324
|
return `rstest-viewport:${(s >>> 0).toString(16)}:${e}`;
|
|
2321
2325
|
}, [
|
|
2322
2326
|
t.rootPath
|
|
2323
|
-
]),
|
|
2327
|
+
]), k = (0, n.useCallback)((e)=>{
|
|
2324
2328
|
try {
|
|
2325
|
-
let t = localStorage.getItem(
|
|
2329
|
+
let t = localStorage.getItem(b(e));
|
|
2326
2330
|
if (!t) return null;
|
|
2327
2331
|
let s = JSON.parse(t);
|
|
2328
2332
|
if (!s || "object" != typeof s) return null;
|
|
@@ -2332,12 +2336,11 @@
|
|
|
2332
2336
|
};
|
|
2333
2337
|
if ("responsive" === l) {
|
|
2334
2338
|
let e = Number(s.width), t = Number(s.height);
|
|
2335
|
-
|
|
2339
|
+
return ey(e, t) ? {
|
|
2336
2340
|
mode: "responsive",
|
|
2337
2341
|
width: e,
|
|
2338
2342
|
height: t
|
|
2339
|
-
};
|
|
2340
|
-
return null;
|
|
2343
|
+
} : null;
|
|
2341
2344
|
}
|
|
2342
2345
|
if ("preset" === l) {
|
|
2343
2346
|
let e = s.preset, t = s.orientation;
|
|
@@ -2352,42 +2355,42 @@
|
|
|
2352
2355
|
return null;
|
|
2353
2356
|
}
|
|
2354
2357
|
}, [
|
|
2355
|
-
|
|
2356
|
-
]),
|
|
2358
|
+
b
|
|
2359
|
+
]), S = (0, n.useCallback)((e, t)=>{
|
|
2357
2360
|
try {
|
|
2358
|
-
localStorage.setItem(
|
|
2361
|
+
localStorage.setItem(b(e), JSON.stringify(t));
|
|
2359
2362
|
} catch {}
|
|
2360
2363
|
}, [
|
|
2361
|
-
|
|
2362
|
-
]), [
|
|
2364
|
+
b
|
|
2365
|
+
]), [F, N] = (0, n.useState)(()=>{
|
|
2363
2366
|
let e = {};
|
|
2364
|
-
for (let s of t.projects ?? [])e[s.name] =
|
|
2367
|
+
for (let s of t.projects ?? [])e[s.name] = k(s.name) ?? e_(s.viewport);
|
|
2365
2368
|
return e;
|
|
2366
2369
|
});
|
|
2367
|
-
(0,
|
|
2368
|
-
|
|
2370
|
+
(0, n.useEffect)(()=>{
|
|
2371
|
+
N((e)=>{
|
|
2369
2372
|
let s = {
|
|
2370
2373
|
...e
|
|
2371
2374
|
};
|
|
2372
|
-
for (let e of t.projects ?? [])s[e.name] || (s[e.name] =
|
|
2375
|
+
for (let e of t.projects ?? [])s[e.name] || (s[e.name] = k(e.name) ?? e_(e.viewport));
|
|
2373
2376
|
return s;
|
|
2374
2377
|
});
|
|
2375
2378
|
}, [
|
|
2376
2379
|
t.projects,
|
|
2377
|
-
|
|
2380
|
+
k
|
|
2378
2381
|
]);
|
|
2379
|
-
let
|
|
2380
|
-
|
|
2382
|
+
let A = (0, n.useCallback)(async (e, s)=>{
|
|
2383
|
+
ez("[Container] handleReloadTestFile called:", e, s), h(e);
|
|
2381
2384
|
let l = document.querySelector(`iframe[data-test-file="${e}"]`);
|
|
2382
|
-
if (
|
|
2385
|
+
if (ez("[Container] Found iframe:", l), !l) throw Error(`Cannot reload test file "${e}": iframe not found`);
|
|
2383
2386
|
let r = "function" == typeof globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : `run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
2384
|
-
|
|
2387
|
+
w((t)=>({
|
|
2385
2388
|
...t,
|
|
2386
2389
|
[e]: r
|
|
2387
|
-
})),
|
|
2390
|
+
})), x((t)=>({
|
|
2388
2391
|
...t,
|
|
2389
2392
|
[e]: "running"
|
|
2390
|
-
})),
|
|
2393
|
+
})), g((t)=>{
|
|
2391
2394
|
let s = t[e] ?? {}, l = {};
|
|
2392
2395
|
for (let [e, t] of Object.entries(s))l[e] = {
|
|
2393
2396
|
...t,
|
|
@@ -2398,39 +2401,39 @@
|
|
|
2398
2401
|
[e]: l
|
|
2399
2402
|
};
|
|
2400
2403
|
});
|
|
2401
|
-
let o =
|
|
2402
|
-
return
|
|
2404
|
+
let o = eP(e, t.runnerUrl, s, !1, r);
|
|
2405
|
+
return ez("[Container] Setting iframe.src to:", o), l.src = o, {
|
|
2403
2406
|
runId: r
|
|
2404
2407
|
};
|
|
2405
2408
|
}, [
|
|
2406
2409
|
t.runnerUrl
|
|
2407
|
-
]), { rpc:
|
|
2408
|
-
let [l, r] = (0,
|
|
2409
|
-
return (0,
|
|
2410
|
+
]), { rpc: P, loading: M, connected: z } = ((e, t, s)=>{
|
|
2411
|
+
let [l, r] = (0, n.useState)(null), [o, a] = (0, n.useState)(!0), [i, c] = (0, n.useState)(!1), d = (0, n.useRef)(e), u = (0, n.useRef)(s), p = (0, n.useRef)(null);
|
|
2412
|
+
return (0, n.useEffect)(()=>{
|
|
2410
2413
|
d.current = e;
|
|
2411
2414
|
}, [
|
|
2412
2415
|
e
|
|
2413
|
-
]), (0,
|
|
2416
|
+
]), (0, n.useEffect)(()=>{
|
|
2414
2417
|
u.current = s;
|
|
2415
2418
|
}, [
|
|
2416
2419
|
s
|
|
2417
|
-
]), (0,
|
|
2420
|
+
]), (0, n.useEffect)(()=>{
|
|
2418
2421
|
if (!t) return void a(!1);
|
|
2419
|
-
let e = null, s = null, l = 0, o = null, i = !0,
|
|
2422
|
+
let e = null, s = null, l = 0, o = null, i = !0, n = ()=>{
|
|
2420
2423
|
let h;
|
|
2421
2424
|
if (!i) return;
|
|
2422
2425
|
p.current = e = new WebSocket((h = "https:" === window.location.protocol ? "wss:" : "ws:", `${h}//${window.location.hostname}:${t}`));
|
|
2423
2426
|
let f = new WeakMap, x = {
|
|
2424
2427
|
onTestFileUpdate (e) {
|
|
2425
|
-
|
|
2428
|
+
ez("[Container RPC] onTestFileUpdate called:", e), d.current(e);
|
|
2426
2429
|
},
|
|
2427
2430
|
async reloadTestFile (e, t) {
|
|
2428
|
-
if (
|
|
2431
|
+
if (ez("[Container RPC] reloadTestFile called:", e, t), !u.current) throw Error("reloadTestFile handler is not available");
|
|
2429
2432
|
return u.current(e, t);
|
|
2430
2433
|
}
|
|
2431
2434
|
};
|
|
2432
2435
|
e.onopen = ()=>{
|
|
2433
|
-
i && e && (
|
|
2436
|
+
i && e && (ez("[Container] WebSocket connected"), l = 0, c(!0), r(s = (0, eM.L)(x, {
|
|
2434
2437
|
timeout: -1,
|
|
2435
2438
|
post: (t)=>{
|
|
2436
2439
|
e?.readyState === WebSocket.OPEN && e.send(JSON.stringify(t));
|
|
@@ -2457,16 +2460,16 @@
|
|
|
2457
2460
|
}));
|
|
2458
2461
|
}, e.onclose = ()=>{
|
|
2459
2462
|
if (p.current !== e || !i) return;
|
|
2460
|
-
|
|
2461
|
-
let t =
|
|
2462
|
-
|
|
2463
|
-
i &&
|
|
2463
|
+
ez("[Container] WebSocket disconnected"), s?.$close(Error("Container WebSocket disconnected")), r(null), c(!1);
|
|
2464
|
+
let t = eA[Math.min(l, eA.length - 1)];
|
|
2465
|
+
ez(`[Container] Reconnecting in ${t}ms (attempt ${l + 1})`), l++, o = setTimeout(()=>{
|
|
2466
|
+
i && n();
|
|
2464
2467
|
}, t);
|
|
2465
2468
|
}, e.onerror = ()=>{
|
|
2466
|
-
i &&
|
|
2469
|
+
i && ez("[Container] WebSocket error");
|
|
2467
2470
|
};
|
|
2468
2471
|
};
|
|
2469
|
-
return
|
|
2472
|
+
return n(), ()=>{
|
|
2470
2473
|
i = !1, o && clearTimeout(o), s?.$close(Error("Container RPC disposed")), e && e.close();
|
|
2471
2474
|
};
|
|
2472
2475
|
}, [
|
|
@@ -2476,63 +2479,56 @@
|
|
|
2476
2479
|
loading: o,
|
|
2477
2480
|
connected: i
|
|
2478
2481
|
};
|
|
2479
|
-
})(
|
|
2480
|
-
(0,
|
|
2481
|
-
|
|
2482
|
+
})(u, t?.wsPort, A);
|
|
2483
|
+
(0, n.useEffect)(()=>{
|
|
2484
|
+
x((e)=>{
|
|
2482
2485
|
let t = {};
|
|
2483
|
-
for (let s of
|
|
2486
|
+
for (let s of c)t[s.testPath] = e[s.testPath] ?? "idle";
|
|
2484
2487
|
return t;
|
|
2485
|
-
}),
|
|
2488
|
+
}), g((e)=>{
|
|
2486
2489
|
let t = {};
|
|
2487
|
-
for (let s of
|
|
2490
|
+
for (let s of c)t[s.testPath] = e[s.testPath] ?? {};
|
|
2488
2491
|
return t;
|
|
2489
|
-
}),
|
|
2492
|
+
}), w((e)=>{
|
|
2490
2493
|
let t = {};
|
|
2491
|
-
for (let s of
|
|
2494
|
+
for (let s of c)e[s.testPath] && (t[s.testPath] = e[s.testPath]);
|
|
2492
2495
|
return t;
|
|
2493
2496
|
});
|
|
2494
|
-
let e =
|
|
2495
|
-
|
|
2497
|
+
let e = c.map((e)=>e.testPath);
|
|
2498
|
+
v((t)=>t.filter((t)=>e.includes(t))), h((t)=>!t && c.length > 0 || t && !e.includes(t) && c.length > 0 ? c[0].testPath : t);
|
|
2496
2499
|
}, [
|
|
2497
|
-
|
|
2498
|
-
]), (0,
|
|
2499
|
-
|
|
2500
|
-
|
|
2500
|
+
c
|
|
2501
|
+
]), (0, n.useEffect)(()=>{
|
|
2502
|
+
P && z && P.onRunnerFramesReady(c.map((e)=>e.testPath)).catch((e)=>{
|
|
2503
|
+
ez("[Container RPC] Failed to notify runner frames ready:", e);
|
|
2501
2504
|
});
|
|
2502
2505
|
}, [
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
+
P,
|
|
2507
|
+
z,
|
|
2508
|
+
c
|
|
2506
2509
|
]);
|
|
2507
|
-
let
|
|
2508
|
-
|
|
2509
|
-
}, []),
|
|
2510
|
-
let s = (
|
|
2511
|
-
|
|
2512
|
-
t
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2510
|
+
let O = (0, n.useCallback)((e)=>"pass" === e ? "pass" : "fail" === e ? "fail" : "skip" === e || "todo" === e ? "skip" : "running", []), R = (0, n.useCallback)((e)=>{
|
|
2511
|
+
h(e);
|
|
2512
|
+
}, []), E = (0, n.useCallback)((e, t)=>{
|
|
2513
|
+
let s = eS({
|
|
2514
|
+
filePath: e,
|
|
2515
|
+
test: t,
|
|
2516
|
+
status: O(t.status)
|
|
2517
|
+
});
|
|
2518
|
+
g((l)=>{
|
|
2519
|
+
let r = l[e] ?? {};
|
|
2516
2520
|
return {
|
|
2517
|
-
...
|
|
2521
|
+
...l,
|
|
2518
2522
|
[e]: {
|
|
2519
|
-
...
|
|
2520
|
-
[t.testId]:
|
|
2521
|
-
id: t.testId,
|
|
2522
|
-
name: t.name,
|
|
2523
|
-
parentNames: s,
|
|
2524
|
-
fullName: l,
|
|
2525
|
-
status: R(t.status),
|
|
2526
|
-
filePath: t.testPath || e,
|
|
2527
|
-
location: t.location
|
|
2528
|
-
}
|
|
2523
|
+
...r,
|
|
2524
|
+
[t.testId]: s
|
|
2529
2525
|
}
|
|
2530
2526
|
};
|
|
2531
2527
|
});
|
|
2532
2528
|
}, [
|
|
2533
|
-
|
|
2534
|
-
]),
|
|
2535
|
-
|
|
2529
|
+
O
|
|
2530
|
+
]), U = (0, n.useCallback)((e, t)=>{
|
|
2531
|
+
g((s)=>{
|
|
2536
2532
|
let l = s[e] ?? {}, r = ((e)=>{
|
|
2537
2533
|
let { filePath: t, tests: s, previousCases: l } = e, r = {}, o = (e)=>{
|
|
2538
2534
|
if ("suite" === e.type) {
|
|
@@ -2540,7 +2536,7 @@
|
|
|
2540
2536
|
return;
|
|
2541
2537
|
}
|
|
2542
2538
|
let s = l[e.testId];
|
|
2543
|
-
r[e.testId] =
|
|
2539
|
+
r[e.testId] = eS({
|
|
2544
2540
|
filePath: t,
|
|
2545
2541
|
test: e,
|
|
2546
2542
|
status: s?.status ?? "idle",
|
|
@@ -2559,8 +2555,8 @@
|
|
|
2559
2555
|
[e]: r
|
|
2560
2556
|
};
|
|
2561
2557
|
});
|
|
2562
|
-
}, []),
|
|
2563
|
-
|
|
2558
|
+
}, []), $ = (0, n.useCallback)((e, t)=>{
|
|
2559
|
+
g((s)=>{
|
|
2564
2560
|
let l = s[e] ?? {};
|
|
2565
2561
|
return {
|
|
2566
2562
|
...s,
|
|
@@ -2568,7 +2564,7 @@
|
|
|
2568
2564
|
let { filePath: t, test: s, previousCases: l } = e, r = l[s.testId];
|
|
2569
2565
|
return {
|
|
2570
2566
|
...l,
|
|
2571
|
-
[s.testId]:
|
|
2567
|
+
[s.testId]: eS({
|
|
2572
2568
|
filePath: t,
|
|
2573
2569
|
test: s,
|
|
2574
2570
|
status: "running",
|
|
@@ -2582,33 +2578,33 @@
|
|
|
2582
2578
|
})
|
|
2583
2579
|
};
|
|
2584
2580
|
});
|
|
2585
|
-
}, []),
|
|
2586
|
-
|
|
2581
|
+
}, []), I = (0, n.useCallback)((e)=>{
|
|
2582
|
+
h(e), P && z && P.rerunTest(e);
|
|
2587
2583
|
}, [
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
]),
|
|
2591
|
-
|
|
2584
|
+
P,
|
|
2585
|
+
z
|
|
2586
|
+
]), B = (0, n.useCallback)((e, t)=>{
|
|
2587
|
+
h(e), P && z && P.rerunTest(e, t);
|
|
2592
2588
|
}, [
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
]),
|
|
2596
|
-
if (
|
|
2589
|
+
P,
|
|
2590
|
+
z
|
|
2591
|
+
]), D = (0, n.useCallback)(()=>{
|
|
2592
|
+
if (P && z) for (let e of c)P.rerunTest(e.testPath);
|
|
2597
2593
|
}, [
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2594
|
+
c,
|
|
2595
|
+
P,
|
|
2596
|
+
z
|
|
2601
2597
|
]);
|
|
2602
|
-
(0,
|
|
2598
|
+
(0, n.useEffect)(()=>{
|
|
2603
2599
|
let e = (e)=>{
|
|
2604
2600
|
let t = e.data?.type !== "__rstest_dispatch__" ? null : e.data.payload;
|
|
2605
2601
|
if (t) {
|
|
2606
2602
|
if ("file-start" === t.type) {
|
|
2607
2603
|
let e = t.payload, s = e.testPath;
|
|
2608
|
-
"string" == typeof s && (
|
|
2604
|
+
"string" == typeof s && (x((e)=>({
|
|
2609
2605
|
...e,
|
|
2610
2606
|
[s]: "running"
|
|
2611
|
-
})),
|
|
2607
|
+
})), g((e)=>{
|
|
2612
2608
|
let t = e[s] ?? {}, l = {};
|
|
2613
2609
|
for (let [e, s] of Object.entries(t))l[e] = {
|
|
2614
2610
|
...s,
|
|
@@ -2618,74 +2614,64 @@
|
|
|
2618
2614
|
...e,
|
|
2619
2615
|
[s]: l
|
|
2620
2616
|
};
|
|
2621
|
-
}),
|
|
2617
|
+
}), P?.onTestFileStart({
|
|
2622
2618
|
testPath: s,
|
|
2623
2619
|
projectName: e.projectName ?? ""
|
|
2624
2620
|
}));
|
|
2625
2621
|
} else if ("case-result" === t.type) {
|
|
2626
2622
|
let e = t.payload;
|
|
2627
|
-
e?.testPath && (
|
|
2623
|
+
e?.testPath && (E(e.testPath, e), P?.onTestCaseResult(e));
|
|
2628
2624
|
} else if ("file-complete" === t.type) {
|
|
2629
2625
|
let s = t.payload, l = s.testPath;
|
|
2630
2626
|
if ("string" == typeof l) {
|
|
2631
2627
|
let t = ((e)=>{
|
|
2632
2628
|
if (e) return Array.from(document.querySelectorAll("iframe[data-test-file]")).find((t)=>t.contentWindow === e);
|
|
2633
|
-
})(e.source) ??
|
|
2634
|
-
|
|
2629
|
+
})(e.source) ?? eR(l), r = (t ? eO(t) : void 0) ?? C[l], o = "pass" === s.status || "skip" === s.status;
|
|
2630
|
+
x((e)=>({
|
|
2635
2631
|
...e,
|
|
2636
2632
|
[l]: o ? "pass" : "fail"
|
|
2637
|
-
})),
|
|
2633
|
+
})), g((e)=>{
|
|
2638
2634
|
let t = {};
|
|
2639
|
-
for (let e of s.results ?? [])
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
t[e.testId] = {
|
|
2645
|
-
id: e.testId,
|
|
2646
|
-
name: e.name,
|
|
2647
|
-
parentNames: s,
|
|
2648
|
-
fullName: r,
|
|
2649
|
-
status: R(e.status),
|
|
2650
|
-
filePath: e.testPath || l,
|
|
2651
|
-
location: e.location
|
|
2652
|
-
};
|
|
2653
|
-
}
|
|
2635
|
+
for (let e of s.results ?? [])e?.testId && (t[e.testId] = eS({
|
|
2636
|
+
filePath: l,
|
|
2637
|
+
test: e,
|
|
2638
|
+
status: O(e.status)
|
|
2639
|
+
}));
|
|
2654
2640
|
return {
|
|
2655
2641
|
...e,
|
|
2656
2642
|
[l]: t
|
|
2657
2643
|
};
|
|
2658
|
-
}),
|
|
2644
|
+
}), P?.onTestFileComplete({
|
|
2659
2645
|
...s,
|
|
2660
2646
|
runId: r
|
|
2661
2647
|
});
|
|
2662
2648
|
}
|
|
2663
2649
|
} else if ("fatal" === t.type) {
|
|
2664
2650
|
let e = t.payload;
|
|
2665
|
-
|
|
2651
|
+
p && x((e)=>({
|
|
2666
2652
|
...e,
|
|
2667
|
-
[
|
|
2668
|
-
})),
|
|
2653
|
+
[p]: "fail"
|
|
2654
|
+
})), P?.onFatal(e);
|
|
2669
2655
|
} else if ("log" === t.type) {
|
|
2670
2656
|
let e = t.payload;
|
|
2671
|
-
|
|
2657
|
+
P?.onLog(e);
|
|
2672
2658
|
} else if ("dispatch-rpc-request" === t.type) {
|
|
2673
2659
|
let s = t.payload;
|
|
2674
|
-
if (s.namespace
|
|
2660
|
+
if ("runner" === s.namespace && "file-ready" === s.method) {
|
|
2675
2661
|
let e = s.args;
|
|
2676
|
-
"string" == typeof e?.testPath && Array.isArray(e.tests) &&
|
|
2662
|
+
"string" == typeof e?.testPath && Array.isArray(e.tests) && U(e.testPath, e);
|
|
2677
2663
|
}
|
|
2678
|
-
if (s.namespace
|
|
2664
|
+
if ("runner" === s.namespace && "case-start" === s.method) {
|
|
2679
2665
|
let e = s.args;
|
|
2680
|
-
"string" == typeof e?.testPath && e.testId &&
|
|
2666
|
+
"string" == typeof e?.testPath && e.testId && $(e.testPath, e);
|
|
2681
2667
|
}
|
|
2682
2668
|
let l = ((e)=>{
|
|
2683
|
-
if (!
|
|
2669
|
+
if (!eb(e) || "browser" !== e.namespace || "rpc" !== e.method) return null;
|
|
2684
2670
|
let t = e.args;
|
|
2685
|
-
return
|
|
2671
|
+
return eb(t) && ek(t, "id") && ek(t, "kind") && ek(t, "method") && ek(t, "testPath") && ek(t, "runId") ? t : null;
|
|
2686
2672
|
})(s);
|
|
2687
2673
|
if (l) {
|
|
2688
|
-
let t =
|
|
2674
|
+
let t = eR(l.testPath), o = t ? eO(t) : void 0;
|
|
2689
2675
|
if (!o || l.runId !== o) {
|
|
2690
2676
|
let t, a;
|
|
2691
2677
|
null !== (t = e.source) && "function" == typeof t.postMessage && e.source.postMessage({
|
|
@@ -2699,22 +2685,22 @@
|
|
|
2699
2685
|
return;
|
|
2700
2686
|
}
|
|
2701
2687
|
}
|
|
2702
|
-
|
|
2688
|
+
eN(P, s, e.source);
|
|
2703
2689
|
}
|
|
2704
2690
|
}
|
|
2705
2691
|
};
|
|
2706
2692
|
return window.addEventListener("message", e), ()=>window.removeEventListener("message", e);
|
|
2707
2693
|
}, [
|
|
2708
|
-
|
|
2694
|
+
p,
|
|
2695
|
+
E,
|
|
2696
|
+
O,
|
|
2697
|
+
P,
|
|
2698
|
+
C,
|
|
2709
2699
|
U,
|
|
2710
|
-
|
|
2711
|
-
M,
|
|
2712
|
-
w,
|
|
2713
|
-
$,
|
|
2714
|
-
I
|
|
2700
|
+
$
|
|
2715
2701
|
]);
|
|
2716
|
-
let
|
|
2717
|
-
let e = Object.values(
|
|
2702
|
+
let L = (0, n.useMemo)(()=>{
|
|
2703
|
+
let e = Object.values(m).flatMap((e)=>Object.values(e));
|
|
2718
2704
|
return {
|
|
2719
2705
|
idle: e.filter((e)=>"idle" === e.status).length,
|
|
2720
2706
|
running: e.filter((e)=>"running" === e.status).length,
|
|
@@ -2723,70 +2709,57 @@
|
|
|
2723
2709
|
skip: e.filter((e)=>"skip" === e.status).length
|
|
2724
2710
|
};
|
|
2725
2711
|
}, [
|
|
2726
|
-
|
|
2727
|
-
]),
|
|
2728
|
-
|
|
2729
|
-
]),
|
|
2712
|
+
m
|
|
2713
|
+
]), q = (0, n.useMemo)(()=>Object.values(f).some((e)=>"running" === e), [
|
|
2714
|
+
f
|
|
2715
|
+
]), H = (0, n.useMemo)(()=>{
|
|
2730
2716
|
let e = [], t = [
|
|
2731
|
-
...new Set(
|
|
2717
|
+
...new Set(c.map((e)=>e.projectName))
|
|
2732
2718
|
];
|
|
2733
|
-
if (t.length > 1) for (let s of t)e.push(
|
|
2734
|
-
for (let t of
|
|
2719
|
+
if (t.length > 1) for (let s of t)e.push(ec(s));
|
|
2720
|
+
for (let t of c){
|
|
2735
2721
|
let s = t.testPath;
|
|
2736
|
-
e.push(s)
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
let t = e.parentNames;
|
|
2740
|
-
for(let e = 1; e <= t.length; e++){
|
|
2741
|
-
let s = t.slice(0, e).join("::");
|
|
2742
|
-
r.add(s);
|
|
2743
|
-
}
|
|
2744
|
-
}
|
|
2745
|
-
for (let t of r){
|
|
2746
|
-
let l = t.split("::"), r = s;
|
|
2747
|
-
for(let e = 1; e <= l.length; e++){
|
|
2748
|
-
let t = l.slice(0, e).join("::");
|
|
2749
|
-
r = `${r}::suite::${t}`;
|
|
2750
|
-
}
|
|
2751
|
-
e.push(r);
|
|
2722
|
+
for (let t of (e.push(s), Object.values(m[s] ?? {}))){
|
|
2723
|
+
let { parentNames: l } = t;
|
|
2724
|
+
for(let t = 1; t <= l.length; t++)e.push(eu(s, l.slice(0, t)));
|
|
2752
2725
|
}
|
|
2753
2726
|
}
|
|
2754
2727
|
return [
|
|
2755
2728
|
...new Set(e)
|
|
2756
2729
|
];
|
|
2757
2730
|
}, [
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
]),
|
|
2731
|
+
c,
|
|
2732
|
+
m
|
|
2733
|
+
]), J = t.projects?.[0]?.name || t.rootPath.split("/").filter(Boolean).pop() || "default", X = `rstest-split-${J}`, K = (0, n.useMemo)(()=>{
|
|
2761
2734
|
let e = new Map;
|
|
2762
2735
|
for (let s of t.projects ?? [])e.set(s.name, s.viewport);
|
|
2763
2736
|
return e;
|
|
2764
2737
|
}, [
|
|
2765
2738
|
t.projects
|
|
2766
|
-
]),
|
|
2767
|
-
if (!
|
|
2768
|
-
let e =
|
|
2739
|
+
]), Y = (0, n.useMemo)(()=>{
|
|
2740
|
+
if (!p) return t.projects?.[0]?.name;
|
|
2741
|
+
let e = c.find((e)=>e.testPath === p);
|
|
2769
2742
|
return e?.projectName ?? t.projects?.[0]?.name;
|
|
2770
2743
|
}, [
|
|
2771
|
-
|
|
2772
|
-
|
|
2744
|
+
p,
|
|
2745
|
+
c,
|
|
2773
2746
|
t.projects
|
|
2774
|
-
]),
|
|
2747
|
+
]), Q = (0, n.useMemo)(()=>Y ? F[Y] ?? e_(K.get(Y)) : {
|
|
2775
2748
|
mode: "full"
|
|
2776
2749
|
}, [
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
]),
|
|
2781
|
-
|
|
2750
|
+
Y,
|
|
2751
|
+
F,
|
|
2752
|
+
K
|
|
2753
|
+
]), ee = (0, n.useCallback)((e)=>{
|
|
2754
|
+
Y && (S(Y, e), N((t)=>({
|
|
2782
2755
|
...t,
|
|
2783
|
-
[
|
|
2756
|
+
[Y]: e
|
|
2784
2757
|
})));
|
|
2785
2758
|
}, [
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
]),
|
|
2789
|
-
|
|
2759
|
+
Y,
|
|
2760
|
+
S
|
|
2761
|
+
]), et = (0, n.useCallback)((e, t)=>{
|
|
2762
|
+
N((s)=>{
|
|
2790
2763
|
let l = s[e];
|
|
2791
2764
|
if (!l || "responsive" !== l.mode || l.width === t.width && l.height === t.height) return s;
|
|
2792
2765
|
let r = {
|
|
@@ -2794,132 +2767,132 @@
|
|
|
2794
2767
|
width: t.width,
|
|
2795
2768
|
height: t.height
|
|
2796
2769
|
};
|
|
2797
|
-
return
|
|
2770
|
+
return S(e, r), {
|
|
2798
2771
|
...s,
|
|
2799
2772
|
[e]: r
|
|
2800
2773
|
};
|
|
2801
2774
|
});
|
|
2802
2775
|
}, [
|
|
2803
|
-
|
|
2776
|
+
S
|
|
2804
2777
|
]);
|
|
2805
2778
|
return (0, l.jsx)("div", {
|
|
2806
2779
|
className: "m-0 h-screen w-full overflow-hidden p-0",
|
|
2807
2780
|
style: {
|
|
2808
|
-
background:
|
|
2781
|
+
background: i.colorBgContainer
|
|
2809
2782
|
},
|
|
2810
|
-
children: (0, l.jsxs)(
|
|
2783
|
+
children: (0, l.jsxs)(G, {
|
|
2811
2784
|
direction: "horizontal",
|
|
2812
2785
|
className: "h-full w-full",
|
|
2813
|
-
autoSaveId:
|
|
2786
|
+
autoSaveId: X,
|
|
2814
2787
|
children: [
|
|
2815
|
-
(0, l.jsx)(
|
|
2788
|
+
(0, l.jsx)(Z, {
|
|
2816
2789
|
defaultSize: 32,
|
|
2817
2790
|
minSize: 20,
|
|
2818
2791
|
maxSize: 50,
|
|
2819
2792
|
children: (0, l.jsxs)("div", {
|
|
2820
2793
|
className: "flex h-full flex-col overflow-hidden",
|
|
2821
2794
|
style: {
|
|
2822
|
-
background:
|
|
2795
|
+
background: i.colorBgContainer
|
|
2823
2796
|
},
|
|
2824
2797
|
children: [
|
|
2825
|
-
(0, l.jsx)(
|
|
2798
|
+
(0, l.jsx)(V, {
|
|
2826
2799
|
theme: s,
|
|
2827
|
-
onThemeToggle:
|
|
2828
|
-
isConnected:
|
|
2829
|
-
token:
|
|
2830
|
-
counts:
|
|
2831
|
-
}),
|
|
2832
|
-
(0, l.jsx)(
|
|
2833
|
-
token:
|
|
2834
|
-
filterText:
|
|
2835
|
-
onFilterChange:
|
|
2836
|
-
isAllExpanded:
|
|
2800
|
+
onThemeToggle: a,
|
|
2801
|
+
isConnected: z,
|
|
2802
|
+
token: i,
|
|
2803
|
+
counts: L
|
|
2804
|
+
}),
|
|
2805
|
+
(0, l.jsx)(el, {
|
|
2806
|
+
token: i,
|
|
2807
|
+
filterText: y,
|
|
2808
|
+
onFilterChange: _,
|
|
2809
|
+
isAllExpanded: H.length > 0 && H.every((e)=>j.includes(e)),
|
|
2837
2810
|
onToggleExpandAll: ()=>{
|
|
2838
|
-
|
|
2811
|
+
H.length > 0 && H.every((e)=>j.includes(e)) ? v([]) : v(H);
|
|
2839
2812
|
},
|
|
2840
|
-
onRerun:
|
|
2841
|
-
counts:
|
|
2842
|
-
isRunning:
|
|
2813
|
+
onRerun: z ? D : void 0,
|
|
2814
|
+
counts: L,
|
|
2815
|
+
isRunning: q
|
|
2843
2816
|
}),
|
|
2844
2817
|
(0, l.jsx)("div", {
|
|
2845
2818
|
className: "flex-1 overflow-x-hidden overflow-y-auto",
|
|
2846
2819
|
style: {
|
|
2847
|
-
background:
|
|
2820
|
+
background: i.colorBgContainer
|
|
2848
2821
|
},
|
|
2849
|
-
children: (0, l.jsx)(
|
|
2850
|
-
testFiles:
|
|
2851
|
-
statusMap:
|
|
2852
|
-
caseMap:
|
|
2822
|
+
children: (0, l.jsx)(ev, {
|
|
2823
|
+
testFiles: c,
|
|
2824
|
+
statusMap: f,
|
|
2825
|
+
caseMap: m,
|
|
2853
2826
|
rootPath: t.rootPath,
|
|
2854
2827
|
projects: t.projects,
|
|
2855
|
-
loading:
|
|
2856
|
-
connected:
|
|
2857
|
-
openFiles:
|
|
2858
|
-
activeFile:
|
|
2859
|
-
token:
|
|
2860
|
-
filterText:
|
|
2861
|
-
onExpandChange:
|
|
2862
|
-
onSelect:
|
|
2863
|
-
onRerunFile:
|
|
2864
|
-
onRerunTestCase:
|
|
2828
|
+
loading: M,
|
|
2829
|
+
connected: z,
|
|
2830
|
+
openFiles: j,
|
|
2831
|
+
activeFile: p,
|
|
2832
|
+
token: i,
|
|
2833
|
+
filterText: y,
|
|
2834
|
+
onExpandChange: v,
|
|
2835
|
+
onSelect: R,
|
|
2836
|
+
onRerunFile: I,
|
|
2837
|
+
onRerunTestCase: B
|
|
2865
2838
|
})
|
|
2866
2839
|
})
|
|
2867
2840
|
]
|
|
2868
2841
|
})
|
|
2869
2842
|
}),
|
|
2870
|
-
(0, l.jsx)(
|
|
2843
|
+
(0, l.jsx)(Z, {
|
|
2871
2844
|
defaultSize: 68,
|
|
2872
2845
|
minSize: 40,
|
|
2873
2846
|
children: (0, l.jsxs)("div", {
|
|
2874
2847
|
className: "flex h-full flex-col overflow-hidden",
|
|
2875
2848
|
style: {
|
|
2876
|
-
background:
|
|
2849
|
+
background: i.colorBgLayout
|
|
2877
2850
|
},
|
|
2878
2851
|
children: [
|
|
2879
|
-
(0, l.jsx)(
|
|
2880
|
-
token:
|
|
2881
|
-
activeFile:
|
|
2852
|
+
(0, l.jsx)(W, {
|
|
2853
|
+
token: i,
|
|
2854
|
+
activeFile: p ?? void 0,
|
|
2882
2855
|
rootPath: t.rootPath,
|
|
2883
|
-
status:
|
|
2884
|
-
viewport:
|
|
2885
|
-
onViewportChange:
|
|
2856
|
+
status: p ? f[p] ?? "idle" : void 0,
|
|
2857
|
+
viewport: Y ? Q : void 0,
|
|
2858
|
+
onViewportChange: Y ? ee : void 0
|
|
2886
2859
|
}),
|
|
2887
2860
|
(0, l.jsxs)("div", {
|
|
2888
2861
|
className: "relative min-h-0 flex-1 overflow-auto",
|
|
2889
2862
|
style: {
|
|
2890
|
-
background:
|
|
2863
|
+
background: i.colorBgLayout
|
|
2891
2864
|
},
|
|
2892
2865
|
children: [
|
|
2893
|
-
!
|
|
2866
|
+
!p && (0, l.jsx)(d, {
|
|
2894
2867
|
message: "Select a test file on the left to view its run output"
|
|
2895
2868
|
}),
|
|
2896
|
-
|
|
2869
|
+
c.map((e)=>{
|
|
2897
2870
|
var s;
|
|
2898
|
-
let r, o, a,
|
|
2899
|
-
return r = e.testPath ===
|
|
2871
|
+
let r, o, a, n;
|
|
2872
|
+
return r = e.testPath === p, o = C[e.testPath], a = F[e.projectName] ?? e_(K.get(e.projectName)), (0, l.jsx)("div", {
|
|
2900
2873
|
className: "h-full w-full",
|
|
2901
2874
|
style: {
|
|
2902
2875
|
display: r ? "block" : "none"
|
|
2903
2876
|
},
|
|
2904
|
-
children: (0, l.jsx)(
|
|
2905
|
-
token:
|
|
2877
|
+
children: (0, l.jsx)(ew, {
|
|
2878
|
+
token: i,
|
|
2906
2879
|
selection: a,
|
|
2907
2880
|
active: r,
|
|
2908
|
-
onResponsiveResize: "responsive" === a.mode ? (t)=>
|
|
2881
|
+
onResponsiveResize: "responsive" === a.mode ? (t)=>et(e.projectName, t) : void 0,
|
|
2909
2882
|
"data-testid": "responsive" === a.mode ? "viewport-resizer" : void 0,
|
|
2910
2883
|
"data-test-project": e.projectName,
|
|
2911
2884
|
"data-test-file": e.testPath,
|
|
2912
2885
|
children: (0, l.jsx)("iframe", {
|
|
2913
2886
|
"data-test-file": e.testPath,
|
|
2914
|
-
title: `Test runner for ${(
|
|
2915
|
-
src: o ?
|
|
2887
|
+
title: `Test runner for ${(n = (s = e.testPath).split("/"))[n.length - 1] || s}`,
|
|
2888
|
+
src: o ? eP(e.testPath, t.runnerUrl, void 0, !1, o) : "about:blank",
|
|
2916
2889
|
className: "block h-full w-full border-0",
|
|
2917
2890
|
style: {
|
|
2918
|
-
background:
|
|
2891
|
+
background: i.colorBgContainer
|
|
2919
2892
|
},
|
|
2920
2893
|
onLoad: (s)=>{
|
|
2921
2894
|
if (!o) return;
|
|
2922
|
-
let l = s.currentTarget, r =
|
|
2895
|
+
let l = s.currentTarget, r = eO(l) ?? o;
|
|
2923
2896
|
l.contentWindow && l.contentWindow.postMessage({
|
|
2924
2897
|
type: "RSTEST_CONFIG",
|
|
2925
2898
|
payload: {
|
|
@@ -2941,19 +2914,19 @@
|
|
|
2941
2914
|
]
|
|
2942
2915
|
})
|
|
2943
2916
|
});
|
|
2944
|
-
},
|
|
2945
|
-
let e = window.__RSTEST_BROWSER_OPTIONS__, [t, s] = (0,
|
|
2946
|
-
(0,
|
|
2947
|
-
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e)=>
|
|
2948
|
-
return
|
|
2949
|
-
}, []), (0,
|
|
2917
|
+
}, eU = ()=>{
|
|
2918
|
+
let e = window.__RSTEST_BROWSER_OPTIONS__, [t, s] = (0, n.useState)("dark"), [r, c] = (0, n.useState)("dark");
|
|
2919
|
+
(0, n.useEffect)(()=>{
|
|
2920
|
+
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e)=>c(e.matches ? "dark" : "light");
|
|
2921
|
+
return c(e.matches ? "dark" : "light"), e.addEventListener("change", t), ()=>e.removeEventListener("change", t);
|
|
2922
|
+
}, []), (0, n.useEffect)(()=>{
|
|
2950
2923
|
try {
|
|
2951
2924
|
let e = window.localStorage.getItem("rstest-theme");
|
|
2952
2925
|
("light" === e || "dark" === e || "system" === e) && s(e);
|
|
2953
2926
|
} catch {}
|
|
2954
2927
|
}, []);
|
|
2955
2928
|
let d = "system" === t ? r : t;
|
|
2956
|
-
if ((0,
|
|
2929
|
+
if ((0, n.useEffect)(()=>{
|
|
2957
2930
|
document.body.dataset.theme = d;
|
|
2958
2931
|
try {
|
|
2959
2932
|
window.localStorage.setItem("rstest-theme", t);
|
|
@@ -2966,14 +2939,14 @@
|
|
|
2966
2939
|
children: "Missing browser options"
|
|
2967
2940
|
});
|
|
2968
2941
|
let u = "dark" === d, p = e.projects?.[0]?.name || e.rootPath.split("/").filter(Boolean).pop() || "rstest";
|
|
2969
|
-
return (0,
|
|
2942
|
+
return (0, n.useEffect)(()=>{
|
|
2970
2943
|
document.title = `${p} [RSTEST BROWSER]`;
|
|
2971
2944
|
}, [
|
|
2972
2945
|
p
|
|
2973
|
-
]), (0, l.jsx)(
|
|
2946
|
+
]), (0, l.jsx)(a.Ay, {
|
|
2974
2947
|
componentSize: "small",
|
|
2975
2948
|
theme: {
|
|
2976
|
-
algorithm: u ?
|
|
2949
|
+
algorithm: u ? o.A.darkAlgorithm : o.A.defaultAlgorithm,
|
|
2977
2950
|
token: {
|
|
2978
2951
|
fontFamily: '"Inter",system-ui,-apple-system,"Segoe UI",sans-serif',
|
|
2979
2952
|
fontFamilyCode: '"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
@@ -2985,21 +2958,21 @@
|
|
|
2985
2958
|
borderRadius: 6
|
|
2986
2959
|
}
|
|
2987
2960
|
},
|
|
2988
|
-
children: (0, l.jsx)(
|
|
2989
|
-
children: (0, l.jsx)(
|
|
2961
|
+
children: (0, l.jsx)(i.A, {
|
|
2962
|
+
children: (0, l.jsx)(eE, {
|
|
2990
2963
|
options: e,
|
|
2991
2964
|
theme: t,
|
|
2992
2965
|
setTheme: s
|
|
2993
2966
|
})
|
|
2994
2967
|
})
|
|
2995
2968
|
});
|
|
2996
|
-
},
|
|
2969
|
+
}, eT = ()=>{
|
|
2997
2970
|
let e = document.getElementById("root");
|
|
2998
|
-
e &&
|
|
2999
|
-
children: (0, l.jsx)(
|
|
2971
|
+
e && c.createRoot(e).render((0, l.jsx)(n.StrictMode, {
|
|
2972
|
+
children: (0, l.jsx)(eU, {})
|
|
3000
2973
|
}));
|
|
3001
2974
|
};
|
|
3002
|
-
"loading" === document.readyState ? document.addEventListener("DOMContentLoaded",
|
|
2975
|
+
"loading" === document.readyState ? document.addEventListener("DOMContentLoaded", eT) : eT();
|
|
3003
2976
|
}
|
|
3004
2977
|
}, i = {};
|
|
3005
2978
|
function n(e) {
|
|
@@ -3025,11 +2998,14 @@
|
|
|
3025
2998
|
o[e] = ()=>s[e];
|
|
3026
2999
|
});
|
|
3027
3000
|
return o.default = ()=>s, n.d(r, o), r;
|
|
3028
|
-
}, n.d = (e, t)=>{
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3001
|
+
}, n.d = (e, t, s)=>{
|
|
3002
|
+
var l = (t, s)=>{
|
|
3003
|
+
for(var l in t)n.o(t, l) && !n.o(e, l) && Object.defineProperty(e, l, {
|
|
3004
|
+
enumerable: !0,
|
|
3005
|
+
[s]: t[l]
|
|
3006
|
+
});
|
|
3007
|
+
};
|
|
3008
|
+
l(t, "get"), l(s, "value");
|
|
3033
3009
|
}, n.o = (e, t)=>Object.prototype.hasOwnProperty.call(e, t), n.r = (e)=>{
|
|
3034
3010
|
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
|
|
3035
3011
|
value: "Module"
|
|
@@ -3069,7 +3045,7 @@
|
|
|
3069
3045
|
}, (o = self.rspackChunk_rstest_browser_ui = self.rspackChunk_rstest_browser_ui || []).forEach(r.bind(null, 0)), o.push = r.bind(null, o.push.bind(o));
|
|
3070
3046
|
var c = n.O(void 0, [
|
|
3071
3047
|
"783",
|
|
3072
|
-
"
|
|
3073
|
-
], ()=>n(
|
|
3048
|
+
"3"
|
|
3049
|
+
], ()=>n(1617));
|
|
3074
3050
|
c = n.O(c);
|
|
3075
3051
|
})();
|