@rstest/browser 0.10.2 → 0.10.3
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} +1 -3
- package/dist/browser-container/container-static/js/{188.480c3c49b5.js → 27.099feaf1da.js} +2772 -2779
- package/dist/browser-container/container-static/js/27.099feaf1da.js.LICENSE.txt +1 -0
- package/dist/browser-container/container-static/js/{index.29fc60be33.js → index.be8c8d2626.js} +408 -405
- package/dist/browser-container/index.html +1 -1
- package/dist/browser.js +2 -2
- package/dist/index.js +41 -6
- package/dist/providers/index.d.ts +3 -0
- package/dist/rslib-runtime.js +9 -5
- package/package.json +6 -6
- package/src/providers/index.ts +3 -0
- package/src/providers/playwright/runtime.ts +104 -4
- package/dist/browser-container/container-static/js/188.480c3c49b5.js.LICENSE.txt +0 -1
package/dist/browser-container/container-static/js/{index.29fc60be33.js → index.be8c8d2626.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
(()=>{
|
|
2
2
|
"use strict";
|
|
3
3
|
var e, t, s, l, r, o, a = {
|
|
4
|
-
|
|
4
|
+
7116 (e, t, s) {
|
|
5
5
|
var l = s(7080);
|
|
6
|
-
let r = "__rstest_dispatch_response__"
|
|
7
|
-
var
|
|
8
|
-
let
|
|
6
|
+
let r = "__rstest_dispatch_response__";
|
|
7
|
+
var o = s(2090), a = s(6273), i = s(4999), n = s(7348), c = s(2303);
|
|
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(9139), p = s(8423), h = s(8376), f = s(2419), x = s(3333);
|
|
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(4713), v = s(7905), y = s(2315), _ = s(971), C = s(4618);
|
|
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(4215), S = s(2113), F = s(9533), N = s(2830), A = s(2927), P = s(9492), M = s(2553), z = s(7677);
|
|
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)), $ = (e)=>"string" == typeof e && U.has(e), T = (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 = 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 = 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}` : T(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(9169);
|
|
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(1896), q = s(354), H = s(5779);
|
|
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(535), K = s(796), Y = s(443), Q = s(2612), ee = s(2912), et = s(7056);
|
|
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,14 @@
|
|
|
1725
1725
|
]
|
|
1726
1726
|
});
|
|
1727
1727
|
};
|
|
1728
|
-
var
|
|
1729
|
-
let
|
|
1728
|
+
var er = s(9202), eo = s(5016), ea = s(4768), ei = s(1146), en = s(9384);
|
|
1729
|
+
let ec = [
|
|
1730
1730
|
"pass",
|
|
1731
1731
|
"fail",
|
|
1732
1732
|
"skip"
|
|
1733
|
-
],
|
|
1734
|
-
let { icon: t, iconColor: s, status: r, label: o, caseId: a, onRerun: i, buttonTextColor:
|
|
1735
|
-
return (0,
|
|
1733
|
+
], ed = (e)=>{
|
|
1734
|
+
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 = ec.includes(r);
|
|
1735
|
+
return (0, n.useEffect)(()=>{
|
|
1736
1736
|
x && null !== d.current && d.current !== r && f((e)=>e + 1), d.current = r;
|
|
1737
1737
|
}, [
|
|
1738
1738
|
r,
|
|
@@ -1743,13 +1743,13 @@
|
|
|
1743
1743
|
"data-test-case": a,
|
|
1744
1744
|
children: [
|
|
1745
1745
|
t && (0, l.jsx)("span", {
|
|
1746
|
-
className: `flex w-[16px] shrink-0 items-center justify-center ${
|
|
1746
|
+
className: `flex w-[16px] shrink-0 items-center justify-center ${h > 0 ? "status-icon-flash" : ""}`,
|
|
1747
1747
|
style: {
|
|
1748
1748
|
color: s
|
|
1749
1749
|
},
|
|
1750
1750
|
children: t
|
|
1751
|
-
},
|
|
1752
|
-
(0, l.jsx)(
|
|
1751
|
+
}, h),
|
|
1752
|
+
(0, l.jsx)(u.A, {
|
|
1753
1753
|
title: o,
|
|
1754
1754
|
mouseLeaveDelay: 0,
|
|
1755
1755
|
children: (0, l.jsx)("span", {
|
|
@@ -1759,13 +1759,13 @@
|
|
|
1759
1759
|
}),
|
|
1760
1760
|
(0, l.jsx)("div", {
|
|
1761
1761
|
className: "opacity-0 transition-opacity duration-200 group-hover:opacity-100",
|
|
1762
|
-
children: (0, l.jsx)(
|
|
1762
|
+
children: (0, l.jsx)(u.A, {
|
|
1763
1763
|
title: "Re-run this test",
|
|
1764
1764
|
mouseLeaveDelay: 0,
|
|
1765
|
-
children: (0, l.jsx)(
|
|
1765
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1766
1766
|
type: "text",
|
|
1767
1767
|
size: "small",
|
|
1768
|
-
icon: (0, l.jsx)(
|
|
1768
|
+
icon: (0, l.jsx)(Q.A, {
|
|
1769
1769
|
size: 14,
|
|
1770
1770
|
strokeWidth: 2.5
|
|
1771
1771
|
}),
|
|
@@ -1776,20 +1776,20 @@
|
|
|
1776
1776
|
className: "inline-flex h-5 w-5 items-center justify-center p-0",
|
|
1777
1777
|
"data-testid": "test-case-rerun",
|
|
1778
1778
|
style: {
|
|
1779
|
-
color:
|
|
1779
|
+
color: c
|
|
1780
1780
|
}
|
|
1781
1781
|
})
|
|
1782
1782
|
})
|
|
1783
1783
|
})
|
|
1784
1784
|
]
|
|
1785
1785
|
});
|
|
1786
|
-
},
|
|
1786
|
+
}, eu = [
|
|
1787
1787
|
"pass",
|
|
1788
1788
|
"fail"
|
|
1789
|
-
],
|
|
1790
|
-
let { icon: t, iconColor: s, status: r, relativePath: o, filePath: a, onOpen: i, onRerun:
|
|
1791
|
-
return (0,
|
|
1792
|
-
g && null !==
|
|
1789
|
+
], ep = (e)=>{
|
|
1790
|
+
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 = eu.includes(r);
|
|
1791
|
+
return (0, n.useEffect)(()=>{
|
|
1792
|
+
g && null !== h.current && h.current !== r && m((e)=>e + 1), h.current = r;
|
|
1793
1793
|
}, [
|
|
1794
1794
|
r,
|
|
1795
1795
|
g
|
|
@@ -1805,7 +1805,7 @@
|
|
|
1805
1805
|
},
|
|
1806
1806
|
children: t
|
|
1807
1807
|
}, f),
|
|
1808
|
-
(0, l.jsx)(
|
|
1808
|
+
(0, l.jsx)(u.A, {
|
|
1809
1809
|
title: o,
|
|
1810
1810
|
styles: {
|
|
1811
1811
|
container: {
|
|
@@ -1822,13 +1822,13 @@
|
|
|
1822
1822
|
(0, l.jsxs)("div", {
|
|
1823
1823
|
className: "flex items-center gap-1 opacity-0 transition-opacity duration-200 group-hover:opacity-100",
|
|
1824
1824
|
children: [
|
|
1825
|
-
(0, l.jsx)(
|
|
1825
|
+
(0, l.jsx)(u.A, {
|
|
1826
1826
|
title: "Open in editor",
|
|
1827
1827
|
mouseLeaveDelay: 0,
|
|
1828
|
-
children: (0, l.jsx)(
|
|
1828
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1829
1829
|
type: "text",
|
|
1830
1830
|
size: "small",
|
|
1831
|
-
icon: (0, l.jsx)(
|
|
1831
|
+
icon: (0, l.jsx)(x.A, {
|
|
1832
1832
|
size: 14,
|
|
1833
1833
|
strokeWidth: 2.5
|
|
1834
1834
|
}),
|
|
@@ -1842,19 +1842,19 @@
|
|
|
1842
1842
|
}
|
|
1843
1843
|
})
|
|
1844
1844
|
}),
|
|
1845
|
-
(0, l.jsx)(
|
|
1845
|
+
(0, l.jsx)(u.A, {
|
|
1846
1846
|
title: "Re-run this file",
|
|
1847
1847
|
mouseLeaveDelay: 0,
|
|
1848
|
-
children: (0, l.jsx)(
|
|
1848
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1849
1849
|
type: "text",
|
|
1850
1850
|
size: "small",
|
|
1851
|
-
icon: (0, l.jsx)(
|
|
1851
|
+
icon: (0, l.jsx)(Q.A, {
|
|
1852
1852
|
size: 14,
|
|
1853
1853
|
strokeWidth: 2.5
|
|
1854
1854
|
}),
|
|
1855
|
-
disabled: !
|
|
1855
|
+
disabled: !c,
|
|
1856
1856
|
onClick: (e)=>{
|
|
1857
|
-
e.stopPropagation(),
|
|
1857
|
+
e.stopPropagation(), c?.();
|
|
1858
1858
|
},
|
|
1859
1859
|
className: "inline-flex h-5 w-5 items-center justify-center p-0",
|
|
1860
1860
|
"data-testid": "test-file-rerun",
|
|
@@ -1867,13 +1867,13 @@
|
|
|
1867
1867
|
})
|
|
1868
1868
|
]
|
|
1869
1869
|
});
|
|
1870
|
-
},
|
|
1870
|
+
}, eh = [
|
|
1871
1871
|
"pass",
|
|
1872
1872
|
"fail",
|
|
1873
1873
|
"skip"
|
|
1874
|
-
],
|
|
1875
|
-
let { icon: t, iconColor: s, status: r, name: o, fullName: a, onRerun: i, buttonTextColor:
|
|
1876
|
-
return (0,
|
|
1874
|
+
], ef = (e)=>{
|
|
1875
|
+
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 = eh.includes(r);
|
|
1876
|
+
return (0, n.useEffect)(()=>{
|
|
1877
1877
|
x && null !== d.current && d.current !== r && f((e)=>e + 1), d.current = r;
|
|
1878
1878
|
}, [
|
|
1879
1879
|
r,
|
|
@@ -1884,13 +1884,13 @@
|
|
|
1884
1884
|
"data-test-suite": a,
|
|
1885
1885
|
children: [
|
|
1886
1886
|
t && (0, l.jsx)("span", {
|
|
1887
|
-
className: `flex w-[16px] shrink-0 items-center justify-center ${
|
|
1887
|
+
className: `flex w-[16px] shrink-0 items-center justify-center ${h > 0 ? "status-icon-flash" : ""}`,
|
|
1888
1888
|
style: {
|
|
1889
1889
|
color: s
|
|
1890
1890
|
},
|
|
1891
1891
|
children: t
|
|
1892
|
-
},
|
|
1893
|
-
(0, l.jsx)(
|
|
1892
|
+
}, h),
|
|
1893
|
+
(0, l.jsx)(u.A, {
|
|
1894
1894
|
title: o,
|
|
1895
1895
|
mouseLeaveDelay: 0,
|
|
1896
1896
|
children: (0, l.jsx)("span", {
|
|
@@ -1900,13 +1900,13 @@
|
|
|
1900
1900
|
}),
|
|
1901
1901
|
(0, l.jsx)("div", {
|
|
1902
1902
|
className: "opacity-0 transition-opacity duration-200 group-hover:opacity-100",
|
|
1903
|
-
children: (0, l.jsx)(
|
|
1903
|
+
children: (0, l.jsx)(u.A, {
|
|
1904
1904
|
title: "Re-run this suite",
|
|
1905
1905
|
mouseLeaveDelay: 0,
|
|
1906
|
-
children: (0, l.jsx)(
|
|
1906
|
+
children: (0, l.jsx)(p.Ay, {
|
|
1907
1907
|
type: "text",
|
|
1908
1908
|
size: "small",
|
|
1909
|
-
icon: (0, l.jsx)(
|
|
1909
|
+
icon: (0, l.jsx)(Q.A, {
|
|
1910
1910
|
size: 14,
|
|
1911
1911
|
strokeWidth: 2.5
|
|
1912
1912
|
}),
|
|
@@ -1917,15 +1917,15 @@
|
|
|
1917
1917
|
className: "inline-flex h-5 w-5 items-center justify-center p-0",
|
|
1918
1918
|
"data-testid": "test-suite-rerun",
|
|
1919
1919
|
style: {
|
|
1920
|
-
color:
|
|
1920
|
+
color: c
|
|
1921
1921
|
}
|
|
1922
1922
|
})
|
|
1923
1923
|
})
|
|
1924
1924
|
})
|
|
1925
1925
|
]
|
|
1926
1926
|
});
|
|
1927
|
-
},
|
|
1928
|
-
let { testFiles: t, statusMap: s, caseMap: r, rootPath: o, projects: a, loading: i, connected:
|
|
1927
|
+
}, ex = (e)=>{
|
|
1928
|
+
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
1929
|
if (!h.trim()) return {
|
|
1930
1930
|
filteredTestFiles: t,
|
|
1931
1931
|
filteredCaseMap: r
|
|
@@ -1944,7 +1944,7 @@
|
|
|
1944
1944
|
t,
|
|
1945
1945
|
r,
|
|
1946
1946
|
h
|
|
1947
|
-
]), C = (0,
|
|
1947
|
+
]), C = (0, n.useCallback)((e, t)=>{
|
|
1948
1948
|
if (0 === t.length) return [
|
|
1949
1949
|
{
|
|
1950
1950
|
key: `${e}::__empty`,
|
|
@@ -1985,16 +1985,16 @@
|
|
|
1985
1985
|
}, o = (t, s)=>{
|
|
1986
1986
|
let a = [];
|
|
1987
1987
|
for (let i of t.children.values()){
|
|
1988
|
-
let t = r(i),
|
|
1988
|
+
let t = r(i), n = b[t], d = `${s}::suite::${i.fullPath.join("::")}`, u = i.fullPath.join(" ");
|
|
1989
1989
|
a.push({
|
|
1990
1990
|
key: d,
|
|
1991
|
-
title: (0, l.jsx)(
|
|
1992
|
-
icon:
|
|
1993
|
-
iconColor:
|
|
1991
|
+
title: (0, l.jsx)(ef, {
|
|
1992
|
+
icon: n.icon,
|
|
1993
|
+
iconColor: n.color,
|
|
1994
1994
|
status: t,
|
|
1995
1995
|
name: i.name,
|
|
1996
1996
|
fullName: u,
|
|
1997
|
-
onRerun:
|
|
1997
|
+
onRerun: c ? ()=>{
|
|
1998
1998
|
v(e, u);
|
|
1999
1999
|
} : void 0,
|
|
2000
2000
|
buttonTextColor: p.colorTextSecondary
|
|
@@ -2004,16 +2004,16 @@
|
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
2006
|
for (let r of t.cases){
|
|
2007
|
-
let t =
|
|
2007
|
+
let t = b[r.status];
|
|
2008
2008
|
a.push({
|
|
2009
2009
|
key: `${s}::case::${r.id}`,
|
|
2010
|
-
title: (0, l.jsx)(
|
|
2010
|
+
title: (0, l.jsx)(ed, {
|
|
2011
2011
|
icon: t.icon,
|
|
2012
2012
|
iconColor: t.color,
|
|
2013
2013
|
status: r.status,
|
|
2014
2014
|
label: r.name,
|
|
2015
2015
|
caseId: r.id,
|
|
2016
|
-
onRerun:
|
|
2016
|
+
onRerun: c ? ()=>{
|
|
2017
2017
|
v(e, r.fullName);
|
|
2018
2018
|
} : void 0,
|
|
2019
2019
|
buttonTextColor: p.colorTextSecondary
|
|
@@ -2026,27 +2026,27 @@
|
|
|
2026
2026
|
};
|
|
2027
2027
|
return o(s, e);
|
|
2028
2028
|
}, [
|
|
2029
|
-
|
|
2029
|
+
c,
|
|
2030
2030
|
v,
|
|
2031
2031
|
p.colorTextSecondary
|
|
2032
|
-
]),
|
|
2032
|
+
]), k = (0, n.useMemo)(()=>{
|
|
2033
2033
|
let e = [
|
|
2034
2034
|
...new Set(y.map((e)=>e.projectName))
|
|
2035
2035
|
], t = new Map;
|
|
2036
2036
|
for (let e of a)t.set(e.name, e.projectRoot);
|
|
2037
2037
|
let r = (e, t)=>{
|
|
2038
|
-
let r = e.testPath, a = s[r] ?? "idle", i =
|
|
2038
|
+
let r = e.testPath, a = s[r] ?? "idle", i = w[a], n = m(r, t ?? o), d = Object.values(_[r] ?? {});
|
|
2039
2039
|
return {
|
|
2040
2040
|
key: r,
|
|
2041
|
-
title: (0, l.jsx)(
|
|
2041
|
+
title: (0, l.jsx)(ep, {
|
|
2042
2042
|
icon: i.icon,
|
|
2043
2043
|
iconColor: i.color,
|
|
2044
2044
|
status: a,
|
|
2045
|
-
relativePath:
|
|
2045
|
+
relativePath: n,
|
|
2046
2046
|
filePath: r,
|
|
2047
|
-
onOpen: ()=>
|
|
2048
|
-
onRerun:
|
|
2049
|
-
|
|
2047
|
+
onOpen: ()=>g(r),
|
|
2048
|
+
onRerun: c ? ()=>{
|
|
2049
|
+
j(r);
|
|
2050
2050
|
} : void 0,
|
|
2051
2051
|
textColor: p.colorTextSecondary
|
|
2052
2052
|
}),
|
|
@@ -2056,7 +2056,7 @@
|
|
|
2056
2056
|
return e.length > 1 ? e.map((e)=>{
|
|
2057
2057
|
let o = y.filter((t)=>t.projectName === e), a = `__project__${e}`, i = t.get(e), n = o.map((e)=>s[e.testPath] ?? "idle"), c = "idle";
|
|
2058
2058
|
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 =
|
|
2059
|
+
let d = w[c];
|
|
2060
2060
|
return {
|
|
2061
2061
|
key: a,
|
|
2062
2062
|
title: (0, l.jsxs)("div", {
|
|
@@ -2064,7 +2064,7 @@
|
|
|
2064
2064
|
"data-testid": "test-project-title",
|
|
2065
2065
|
"data-test-project": e,
|
|
2066
2066
|
children: [
|
|
2067
|
-
(0, l.jsx)(
|
|
2067
|
+
(0, l.jsx)(ea.A, {
|
|
2068
2068
|
size: 14,
|
|
2069
2069
|
style: {
|
|
2070
2070
|
color: d.color
|
|
@@ -2088,8 +2088,8 @@
|
|
|
2088
2088
|
}, [
|
|
2089
2089
|
C,
|
|
2090
2090
|
_,
|
|
2091
|
-
|
|
2092
|
-
|
|
2091
|
+
c,
|
|
2092
|
+
j,
|
|
2093
2093
|
a,
|
|
2094
2094
|
o,
|
|
2095
2095
|
s,
|
|
@@ -2105,12 +2105,12 @@
|
|
|
2105
2105
|
].map((e)=>(0, l.jsxs)("div", {
|
|
2106
2106
|
className: "flex items-center gap-2",
|
|
2107
2107
|
children: [
|
|
2108
|
-
(0, l.jsx)(
|
|
2108
|
+
(0, l.jsx)(er.A.Avatar, {
|
|
2109
2109
|
active: !0,
|
|
2110
2110
|
size: "small",
|
|
2111
2111
|
shape: "circle"
|
|
2112
2112
|
}),
|
|
2113
|
-
(0, l.jsx)(
|
|
2113
|
+
(0, l.jsx)(er.A.Input, {
|
|
2114
2114
|
active: !0,
|
|
2115
2115
|
size: "small",
|
|
2116
2116
|
style: {
|
|
@@ -2119,7 +2119,7 @@
|
|
|
2119
2119
|
})
|
|
2120
2120
|
]
|
|
2121
2121
|
}, e))
|
|
2122
|
-
}) :
|
|
2122
|
+
}) : c ? 0 === t.length ? (0, l.jsx)("div", {
|
|
2123
2123
|
className: "flex h-full items-center justify-center",
|
|
2124
2124
|
children: (0, l.jsx)("span", {
|
|
2125
2125
|
className: "text-(--muted-foreground)",
|
|
@@ -2131,14 +2131,14 @@
|
|
|
2131
2131
|
className: "text-(--muted-foreground)",
|
|
2132
2132
|
children: "No matching tests found"
|
|
2133
2133
|
})
|
|
2134
|
-
}) : (0, l.jsx)(
|
|
2134
|
+
}) : (0, l.jsx)(eo.A, {
|
|
2135
2135
|
blockNode: !0,
|
|
2136
2136
|
"data-testid": "test-files-tree",
|
|
2137
2137
|
showLine: !1,
|
|
2138
|
-
switcherIcon: (e)=>e.expanded ? (0, l.jsx)(
|
|
2138
|
+
switcherIcon: (e)=>e.expanded ? (0, l.jsx)(ei.A, {
|
|
2139
2139
|
size: 12,
|
|
2140
2140
|
strokeWidth: 2.5
|
|
2141
|
-
}) : (0, l.jsx)(
|
|
2141
|
+
}) : (0, l.jsx)(en.A, {
|
|
2142
2142
|
size: 12,
|
|
2143
2143
|
strokeWidth: 2.5
|
|
2144
2144
|
}),
|
|
@@ -2153,7 +2153,7 @@
|
|
|
2153
2153
|
let s = t.node.key, l = y.map((e)=>e.testPath);
|
|
2154
2154
|
"string" == typeof s && l.includes(s) && x(s);
|
|
2155
2155
|
},
|
|
2156
|
-
treeData:
|
|
2156
|
+
treeData: k,
|
|
2157
2157
|
className: "bg-transparent",
|
|
2158
2158
|
style: {
|
|
2159
2159
|
marginLeft: "16px"
|
|
@@ -2165,11 +2165,11 @@
|
|
|
2165
2165
|
children: "Reconnecting..."
|
|
2166
2166
|
})
|
|
2167
2167
|
});
|
|
2168
|
-
},
|
|
2168
|
+
}, em = (e)=>{
|
|
2169
2169
|
if (!e) return {
|
|
2170
2170
|
mode: "full"
|
|
2171
2171
|
};
|
|
2172
|
-
if ("string" == typeof e &&
|
|
2172
|
+
if ("string" == typeof e && $(e)) return {
|
|
2173
2173
|
mode: "preset",
|
|
2174
2174
|
preset: e,
|
|
2175
2175
|
orientation: "portrait"
|
|
@@ -2185,14 +2185,14 @@
|
|
|
2185
2185
|
return {
|
|
2186
2186
|
mode: "full"
|
|
2187
2187
|
};
|
|
2188
|
-
},
|
|
2189
|
-
let { token: t, selection: s, active: r, onResponsiveResize: o, children: a, ...i } = e,
|
|
2188
|
+
}, eg = (e, t, s)=>Math.min(s, Math.max(t, e)), ej = (e)=>{
|
|
2189
|
+
let { token: t, selection: s, active: r, onResponsiveResize: o, children: a, ...i } = e, c = (0, n.useRef)(null), d = ((e)=>{
|
|
2190
2190
|
if ("full" === e.mode) return null;
|
|
2191
2191
|
if ("responsive" === e.mode) return {
|
|
2192
2192
|
width: e.width,
|
|
2193
2193
|
height: e.height
|
|
2194
2194
|
};
|
|
2195
|
-
let t =
|
|
2195
|
+
let t = T(e.preset);
|
|
2196
2196
|
return "landscape" === e.orientation ? {
|
|
2197
2197
|
width: t.height,
|
|
2198
2198
|
height: t.width
|
|
@@ -2201,9 +2201,9 @@
|
|
|
2201
2201
|
height: t.height
|
|
2202
2202
|
};
|
|
2203
2203
|
})(s);
|
|
2204
|
-
return ((0,
|
|
2204
|
+
return ((0, n.useLayoutEffect)(()=>{
|
|
2205
2205
|
if (!r || "responsive" !== s.mode || !o) return;
|
|
2206
|
-
let e =
|
|
2206
|
+
let e = c.current;
|
|
2207
2207
|
if (!e) return;
|
|
2208
2208
|
let t = !0, l = new ResizeObserver((e)=>{
|
|
2209
2209
|
let l = e[0]?.contentRect;
|
|
@@ -2213,7 +2213,7 @@
|
|
|
2213
2213
|
return;
|
|
2214
2214
|
}
|
|
2215
2215
|
if (l.width <= 0 || l.height <= 0) return;
|
|
2216
|
-
let r =
|
|
2216
|
+
let r = eg(Math.round(l.width), 1, 1e4), a = eg(Math.round(l.height), 1, 1e4);
|
|
2217
2217
|
(r !== s.width || a !== s.height) && o({
|
|
2218
2218
|
width: r,
|
|
2219
2219
|
height: a
|
|
@@ -2227,7 +2227,7 @@
|
|
|
2227
2227
|
]), d) ? (0, l.jsx)("div", {
|
|
2228
2228
|
className: "flex h-full w-full items-start justify-center p-4 overflow-auto",
|
|
2229
2229
|
children: (0, l.jsx)("div", {
|
|
2230
|
-
ref:
|
|
2230
|
+
ref: c,
|
|
2231
2231
|
className: "shrink-0 relative group",
|
|
2232
2232
|
style: {
|
|
2233
2233
|
width: d.width,
|
|
@@ -2254,7 +2254,7 @@
|
|
|
2254
2254
|
...i,
|
|
2255
2255
|
children: a
|
|
2256
2256
|
});
|
|
2257
|
-
},
|
|
2257
|
+
}, ev = (e)=>"object" == typeof e && null !== e, ey = (e, t)=>"string" == typeof e[t], e_ = (e)=>{
|
|
2258
2258
|
let { filePath: t, test: s, status: l, previousCase: r } = e, o = (s.parentNames ?? []).filter(Boolean), a = [
|
|
2259
2259
|
...o,
|
|
2260
2260
|
s.name
|
|
@@ -2268,7 +2268,7 @@
|
|
|
2268
2268
|
filePath: s.testPath || r?.filePath || t,
|
|
2269
2269
|
location: s.location ?? r?.location
|
|
2270
2270
|
};
|
|
2271
|
-
},
|
|
2271
|
+
}, eC = (e)=>"object" == typeof e && null !== e && "requestId" in e && "string" == typeof e.requestId ? e.requestId : "unknown-request", ew = async (e, t, s)=>{
|
|
2272
2272
|
if (null === s || "function" != typeof s.postMessage) return;
|
|
2273
2273
|
let l = (e)=>{
|
|
2274
2274
|
s.postMessage({
|
|
@@ -2276,8 +2276,8 @@
|
|
|
2276
2276
|
payload: e
|
|
2277
2277
|
}, "*");
|
|
2278
2278
|
};
|
|
2279
|
-
if ("unknown-request" ===
|
|
2280
|
-
requestId:
|
|
2279
|
+
if ("unknown-request" === eC(t)) return void l({
|
|
2280
|
+
requestId: eC(t),
|
|
2281
2281
|
error: "Invalid dispatch request payload: expected an object with string requestId."
|
|
2282
2282
|
});
|
|
2283
2283
|
if (!e) return void l({
|
|
@@ -2292,37 +2292,37 @@
|
|
|
2292
2292
|
error: e instanceof Error ? e.message : String(e)
|
|
2293
2293
|
});
|
|
2294
2294
|
}
|
|
2295
|
-
},
|
|
2295
|
+
}, eb = [
|
|
2296
2296
|
1e3,
|
|
2297
2297
|
2e3,
|
|
2298
2298
|
4e3,
|
|
2299
2299
|
8e3,
|
|
2300
2300
|
16e3,
|
|
2301
2301
|
3e4
|
|
2302
|
-
],
|
|
2302
|
+
], ek = function(e, t, s) {
|
|
2303
2303
|
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
2304
|
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
2305
|
};
|
|
2306
|
-
var
|
|
2307
|
-
let
|
|
2306
|
+
var eS = s(5999);
|
|
2307
|
+
let eF = function() {
|
|
2308
2308
|
for(var e = arguments.length, t = Array(e), s = 0; s < e; s++)t[s] = arguments[s];
|
|
2309
2309
|
window.__RSTEST_BROWSER_OPTIONS__?.debug === !0 && console.log(...t);
|
|
2310
|
-
},
|
|
2310
|
+
}, eN = (e)=>{
|
|
2311
2311
|
try {
|
|
2312
2312
|
return new URL(e.src, window.location.href).searchParams.get("runId") ?? void 0;
|
|
2313
2313
|
} catch {
|
|
2314
2314
|
return;
|
|
2315
2315
|
}
|
|
2316
|
-
},
|
|
2317
|
-
let { options: t, theme: s, setTheme:
|
|
2316
|
+
}, eA = (e)=>Array.from(document.querySelectorAll("iframe[data-test-file]")).find((t)=>t.dataset.testFile === e), eP = (e)=>{
|
|
2317
|
+
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
2318
|
let s = 5381;
|
|
2319
2319
|
for(let e = 0; e < t.rootPath.length; e++)s = 33 * s ^ t.rootPath.charCodeAt(e);
|
|
2320
2320
|
return `rstest-viewport:${(s >>> 0).toString(16)}:${e}`;
|
|
2321
2321
|
}, [
|
|
2322
2322
|
t.rootPath
|
|
2323
|
-
]),
|
|
2323
|
+
]), k = (0, n.useCallback)((e)=>{
|
|
2324
2324
|
try {
|
|
2325
|
-
let t = localStorage.getItem(
|
|
2325
|
+
let t = localStorage.getItem(b(e));
|
|
2326
2326
|
if (!t) return null;
|
|
2327
2327
|
let s = JSON.parse(t);
|
|
2328
2328
|
if (!s || "object" != typeof s) return null;
|
|
@@ -2341,7 +2341,7 @@
|
|
|
2341
2341
|
}
|
|
2342
2342
|
if ("preset" === l) {
|
|
2343
2343
|
let e = s.preset, t = s.orientation;
|
|
2344
|
-
if (
|
|
2344
|
+
if ($(e) && ("portrait" === t || "landscape" === t)) return {
|
|
2345
2345
|
mode: "preset",
|
|
2346
2346
|
preset: e,
|
|
2347
2347
|
orientation: t
|
|
@@ -2352,42 +2352,42 @@
|
|
|
2352
2352
|
return null;
|
|
2353
2353
|
}
|
|
2354
2354
|
}, [
|
|
2355
|
-
|
|
2356
|
-
]),
|
|
2355
|
+
b
|
|
2356
|
+
]), S = (0, n.useCallback)((e, t)=>{
|
|
2357
2357
|
try {
|
|
2358
|
-
localStorage.setItem(
|
|
2358
|
+
localStorage.setItem(b(e), JSON.stringify(t));
|
|
2359
2359
|
} catch {}
|
|
2360
2360
|
}, [
|
|
2361
|
-
|
|
2362
|
-
]), [
|
|
2361
|
+
b
|
|
2362
|
+
]), [F, N] = (0, n.useState)(()=>{
|
|
2363
2363
|
let e = {};
|
|
2364
|
-
for (let s of t.projects ?? [])e[s.name] =
|
|
2364
|
+
for (let s of t.projects ?? [])e[s.name] = k(s.name) ?? em(s.viewport);
|
|
2365
2365
|
return e;
|
|
2366
2366
|
});
|
|
2367
|
-
(0,
|
|
2368
|
-
|
|
2367
|
+
(0, n.useEffect)(()=>{
|
|
2368
|
+
N((e)=>{
|
|
2369
2369
|
let s = {
|
|
2370
2370
|
...e
|
|
2371
2371
|
};
|
|
2372
|
-
for (let e of t.projects ?? [])s[e.name] || (s[e.name] =
|
|
2372
|
+
for (let e of t.projects ?? [])s[e.name] || (s[e.name] = k(e.name) ?? em(e.viewport));
|
|
2373
2373
|
return s;
|
|
2374
2374
|
});
|
|
2375
2375
|
}, [
|
|
2376
2376
|
t.projects,
|
|
2377
|
-
|
|
2377
|
+
k
|
|
2378
2378
|
]);
|
|
2379
|
-
let
|
|
2380
|
-
|
|
2379
|
+
let A = (0, n.useCallback)(async (e, s)=>{
|
|
2380
|
+
eF("[Container] handleReloadTestFile called:", e, s), h(e);
|
|
2381
2381
|
let l = document.querySelector(`iframe[data-test-file="${e}"]`);
|
|
2382
|
-
if (
|
|
2382
|
+
if (eF("[Container] Found iframe:", l), !l) throw Error(`Cannot reload test file "${e}": iframe not found`);
|
|
2383
2383
|
let r = "function" == typeof globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : `run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
2384
|
-
|
|
2384
|
+
w((t)=>({
|
|
2385
2385
|
...t,
|
|
2386
2386
|
[e]: r
|
|
2387
|
-
})),
|
|
2387
|
+
})), x((t)=>({
|
|
2388
2388
|
...t,
|
|
2389
2389
|
[e]: "running"
|
|
2390
|
-
})),
|
|
2390
|
+
})), g((t)=>{
|
|
2391
2391
|
let s = t[e] ?? {}, l = {};
|
|
2392
2392
|
for (let [e, t] of Object.entries(s))l[e] = {
|
|
2393
2393
|
...t,
|
|
@@ -2398,39 +2398,39 @@
|
|
|
2398
2398
|
[e]: l
|
|
2399
2399
|
};
|
|
2400
2400
|
});
|
|
2401
|
-
let o =
|
|
2402
|
-
return
|
|
2401
|
+
let o = ek(e, t.runnerUrl, s, !1, r);
|
|
2402
|
+
return eF("[Container] Setting iframe.src to:", o), l.src = o, {
|
|
2403
2403
|
runId: r
|
|
2404
2404
|
};
|
|
2405
2405
|
}, [
|
|
2406
2406
|
t.runnerUrl
|
|
2407
|
-
]), { rpc:
|
|
2408
|
-
let [l, r] = (0,
|
|
2409
|
-
return (0,
|
|
2407
|
+
]), { rpc: P, loading: M, connected: z } = ((e, t, s)=>{
|
|
2408
|
+
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);
|
|
2409
|
+
return (0, n.useEffect)(()=>{
|
|
2410
2410
|
d.current = e;
|
|
2411
2411
|
}, [
|
|
2412
2412
|
e
|
|
2413
|
-
]), (0,
|
|
2413
|
+
]), (0, n.useEffect)(()=>{
|
|
2414
2414
|
u.current = s;
|
|
2415
2415
|
}, [
|
|
2416
2416
|
s
|
|
2417
|
-
]), (0,
|
|
2417
|
+
]), (0, n.useEffect)(()=>{
|
|
2418
2418
|
if (!t) return void a(!1);
|
|
2419
|
-
let e = null, s = null, l = 0, o = null, i = !0,
|
|
2419
|
+
let e = null, s = null, l = 0, o = null, i = !0, n = ()=>{
|
|
2420
2420
|
let h;
|
|
2421
2421
|
if (!i) return;
|
|
2422
2422
|
p.current = e = new WebSocket((h = "https:" === window.location.protocol ? "wss:" : "ws:", `${h}//${window.location.hostname}:${t}`));
|
|
2423
2423
|
let f = new WeakMap, x = {
|
|
2424
2424
|
onTestFileUpdate (e) {
|
|
2425
|
-
|
|
2425
|
+
eF("[Container RPC] onTestFileUpdate called:", e), d.current(e);
|
|
2426
2426
|
},
|
|
2427
2427
|
async reloadTestFile (e, t) {
|
|
2428
|
-
if (
|
|
2428
|
+
if (eF("[Container RPC] reloadTestFile called:", e, t), !u.current) throw Error("reloadTestFile handler is not available");
|
|
2429
2429
|
return u.current(e, t);
|
|
2430
2430
|
}
|
|
2431
2431
|
};
|
|
2432
2432
|
e.onopen = ()=>{
|
|
2433
|
-
i && e && (
|
|
2433
|
+
i && e && (eF("[Container] WebSocket connected"), l = 0, c(!0), r(s = (0, eS.L)(x, {
|
|
2434
2434
|
timeout: -1,
|
|
2435
2435
|
post: (t)=>{
|
|
2436
2436
|
e?.readyState === WebSocket.OPEN && e.send(JSON.stringify(t));
|
|
@@ -2457,16 +2457,16 @@
|
|
|
2457
2457
|
}));
|
|
2458
2458
|
}, e.onclose = ()=>{
|
|
2459
2459
|
if (p.current !== e || !i) return;
|
|
2460
|
-
|
|
2461
|
-
let t =
|
|
2462
|
-
|
|
2463
|
-
i &&
|
|
2460
|
+
eF("[Container] WebSocket disconnected"), s?.$close(Error("Container WebSocket disconnected")), r(null), c(!1);
|
|
2461
|
+
let t = eb[Math.min(l, eb.length - 1)];
|
|
2462
|
+
eF(`[Container] Reconnecting in ${t}ms (attempt ${l + 1})`), l++, o = setTimeout(()=>{
|
|
2463
|
+
i && n();
|
|
2464
2464
|
}, t);
|
|
2465
2465
|
}, e.onerror = ()=>{
|
|
2466
|
-
i &&
|
|
2466
|
+
i && eF("[Container] WebSocket error");
|
|
2467
2467
|
};
|
|
2468
2468
|
};
|
|
2469
|
-
return
|
|
2469
|
+
return n(), ()=>{
|
|
2470
2470
|
i = !1, o && clearTimeout(o), s?.$close(Error("Container RPC disposed")), e && e.close();
|
|
2471
2471
|
};
|
|
2472
2472
|
}, [
|
|
@@ -2476,42 +2476,42 @@
|
|
|
2476
2476
|
loading: o,
|
|
2477
2477
|
connected: i
|
|
2478
2478
|
};
|
|
2479
|
-
})(
|
|
2480
|
-
(0,
|
|
2481
|
-
|
|
2479
|
+
})(u, t?.wsPort, A);
|
|
2480
|
+
(0, n.useEffect)(()=>{
|
|
2481
|
+
x((e)=>{
|
|
2482
2482
|
let t = {};
|
|
2483
|
-
for (let s of
|
|
2483
|
+
for (let s of c)t[s.testPath] = e[s.testPath] ?? "idle";
|
|
2484
2484
|
return t;
|
|
2485
|
-
}),
|
|
2485
|
+
}), g((e)=>{
|
|
2486
2486
|
let t = {};
|
|
2487
|
-
for (let s of
|
|
2487
|
+
for (let s of c)t[s.testPath] = e[s.testPath] ?? {};
|
|
2488
2488
|
return t;
|
|
2489
|
-
}),
|
|
2489
|
+
}), w((e)=>{
|
|
2490
2490
|
let t = {};
|
|
2491
|
-
for (let s of
|
|
2491
|
+
for (let s of c)e[s.testPath] && (t[s.testPath] = e[s.testPath]);
|
|
2492
2492
|
return t;
|
|
2493
2493
|
});
|
|
2494
|
-
let e =
|
|
2495
|
-
|
|
2494
|
+
let e = c.map((e)=>e.testPath);
|
|
2495
|
+
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
2496
|
}, [
|
|
2497
|
-
|
|
2498
|
-
]), (0,
|
|
2499
|
-
|
|
2500
|
-
|
|
2497
|
+
c
|
|
2498
|
+
]), (0, n.useEffect)(()=>{
|
|
2499
|
+
P && z && P.onRunnerFramesReady(c.map((e)=>e.testPath)).catch((e)=>{
|
|
2500
|
+
eF("[Container RPC] Failed to notify runner frames ready:", e);
|
|
2501
2501
|
});
|
|
2502
2502
|
}, [
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2503
|
+
P,
|
|
2504
|
+
z,
|
|
2505
|
+
c
|
|
2506
2506
|
]);
|
|
2507
|
-
let
|
|
2508
|
-
|
|
2509
|
-
}, []),
|
|
2507
|
+
let O = (0, n.useCallback)((e)=>"pass" === e ? "pass" : "fail" === e ? "fail" : "skip" === e || "todo" === e ? "skip" : "running", []), R = (0, n.useCallback)((e)=>{
|
|
2508
|
+
h(e);
|
|
2509
|
+
}, []), E = (0, n.useCallback)((e, t)=>{
|
|
2510
2510
|
let s = (t.parentNames ?? []).filter(Boolean), l = [
|
|
2511
2511
|
...s,
|
|
2512
2512
|
t.name
|
|
2513
2513
|
].join(" ") || t.name;
|
|
2514
|
-
|
|
2514
|
+
g((r)=>{
|
|
2515
2515
|
let o = r[e] ?? {};
|
|
2516
2516
|
return {
|
|
2517
2517
|
...r,
|
|
@@ -2522,7 +2522,7 @@
|
|
|
2522
2522
|
name: t.name,
|
|
2523
2523
|
parentNames: s,
|
|
2524
2524
|
fullName: l,
|
|
2525
|
-
status:
|
|
2525
|
+
status: O(t.status),
|
|
2526
2526
|
filePath: t.testPath || e,
|
|
2527
2527
|
location: t.location
|
|
2528
2528
|
}
|
|
@@ -2530,9 +2530,9 @@
|
|
|
2530
2530
|
};
|
|
2531
2531
|
});
|
|
2532
2532
|
}, [
|
|
2533
|
-
|
|
2534
|
-
]),
|
|
2535
|
-
|
|
2533
|
+
O
|
|
2534
|
+
]), U = (0, n.useCallback)((e, t)=>{
|
|
2535
|
+
g((s)=>{
|
|
2536
2536
|
let l = s[e] ?? {}, r = ((e)=>{
|
|
2537
2537
|
let { filePath: t, tests: s, previousCases: l } = e, r = {}, o = (e)=>{
|
|
2538
2538
|
if ("suite" === e.type) {
|
|
@@ -2540,7 +2540,7 @@
|
|
|
2540
2540
|
return;
|
|
2541
2541
|
}
|
|
2542
2542
|
let s = l[e.testId];
|
|
2543
|
-
r[e.testId] =
|
|
2543
|
+
r[e.testId] = e_({
|
|
2544
2544
|
filePath: t,
|
|
2545
2545
|
test: e,
|
|
2546
2546
|
status: s?.status ?? "idle",
|
|
@@ -2559,8 +2559,8 @@
|
|
|
2559
2559
|
[e]: r
|
|
2560
2560
|
};
|
|
2561
2561
|
});
|
|
2562
|
-
}, []),
|
|
2563
|
-
|
|
2562
|
+
}, []), T = (0, n.useCallback)((e, t)=>{
|
|
2563
|
+
g((s)=>{
|
|
2564
2564
|
let l = s[e] ?? {};
|
|
2565
2565
|
return {
|
|
2566
2566
|
...s,
|
|
@@ -2568,7 +2568,7 @@
|
|
|
2568
2568
|
let { filePath: t, test: s, previousCases: l } = e, r = l[s.testId];
|
|
2569
2569
|
return {
|
|
2570
2570
|
...l,
|
|
2571
|
-
[s.testId]:
|
|
2571
|
+
[s.testId]: e_({
|
|
2572
2572
|
filePath: t,
|
|
2573
2573
|
test: s,
|
|
2574
2574
|
status: "running",
|
|
@@ -2582,33 +2582,33 @@
|
|
|
2582
2582
|
})
|
|
2583
2583
|
};
|
|
2584
2584
|
});
|
|
2585
|
-
}, []),
|
|
2586
|
-
|
|
2585
|
+
}, []), I = (0, n.useCallback)((e)=>{
|
|
2586
|
+
h(e), P && z && P.rerunTest(e);
|
|
2587
2587
|
}, [
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
]),
|
|
2591
|
-
|
|
2588
|
+
P,
|
|
2589
|
+
z
|
|
2590
|
+
]), B = (0, n.useCallback)((e, t)=>{
|
|
2591
|
+
h(e), P && z && P.rerunTest(e, t);
|
|
2592
2592
|
}, [
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
]),
|
|
2596
|
-
if (
|
|
2593
|
+
P,
|
|
2594
|
+
z
|
|
2595
|
+
]), D = (0, n.useCallback)(()=>{
|
|
2596
|
+
if (P && z) for (let e of c)P.rerunTest(e.testPath);
|
|
2597
2597
|
}, [
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2598
|
+
c,
|
|
2599
|
+
P,
|
|
2600
|
+
z
|
|
2601
2601
|
]);
|
|
2602
|
-
(0,
|
|
2602
|
+
(0, n.useEffect)(()=>{
|
|
2603
2603
|
let e = (e)=>{
|
|
2604
2604
|
let t = e.data?.type !== "__rstest_dispatch__" ? null : e.data.payload;
|
|
2605
2605
|
if (t) {
|
|
2606
2606
|
if ("file-start" === t.type) {
|
|
2607
2607
|
let e = t.payload, s = e.testPath;
|
|
2608
|
-
"string" == typeof s && (
|
|
2608
|
+
"string" == typeof s && (x((e)=>({
|
|
2609
2609
|
...e,
|
|
2610
2610
|
[s]: "running"
|
|
2611
|
-
})),
|
|
2611
|
+
})), g((e)=>{
|
|
2612
2612
|
let t = e[s] ?? {}, l = {};
|
|
2613
2613
|
for (let [e, s] of Object.entries(t))l[e] = {
|
|
2614
2614
|
...s,
|
|
@@ -2618,23 +2618,23 @@
|
|
|
2618
2618
|
...e,
|
|
2619
2619
|
[s]: l
|
|
2620
2620
|
};
|
|
2621
|
-
}),
|
|
2621
|
+
}), P?.onTestFileStart({
|
|
2622
2622
|
testPath: s,
|
|
2623
2623
|
projectName: e.projectName ?? ""
|
|
2624
2624
|
}));
|
|
2625
2625
|
} else if ("case-result" === t.type) {
|
|
2626
2626
|
let e = t.payload;
|
|
2627
|
-
e?.testPath && (
|
|
2627
|
+
e?.testPath && (E(e.testPath, e), P?.onTestCaseResult(e));
|
|
2628
2628
|
} else if ("file-complete" === t.type) {
|
|
2629
2629
|
let s = t.payload, l = s.testPath;
|
|
2630
2630
|
if ("string" == typeof l) {
|
|
2631
2631
|
let t = ((e)=>{
|
|
2632
2632
|
if (e) return Array.from(document.querySelectorAll("iframe[data-test-file]")).find((t)=>t.contentWindow === e);
|
|
2633
|
-
})(e.source) ??
|
|
2634
|
-
|
|
2633
|
+
})(e.source) ?? eA(l), r = (t ? eN(t) : void 0) ?? C[l], o = "pass" === s.status || "skip" === s.status;
|
|
2634
|
+
x((e)=>({
|
|
2635
2635
|
...e,
|
|
2636
2636
|
[l]: o ? "pass" : "fail"
|
|
2637
|
-
})),
|
|
2637
|
+
})), g((e)=>{
|
|
2638
2638
|
let t = {};
|
|
2639
2639
|
for (let e of s.results ?? [])if (e?.testId) {
|
|
2640
2640
|
let s = (e.parentNames ?? []).filter(Boolean), r = [
|
|
@@ -2646,7 +2646,7 @@
|
|
|
2646
2646
|
name: e.name,
|
|
2647
2647
|
parentNames: s,
|
|
2648
2648
|
fullName: r,
|
|
2649
|
-
status:
|
|
2649
|
+
status: O(e.status),
|
|
2650
2650
|
filePath: e.testPath || l,
|
|
2651
2651
|
location: e.location
|
|
2652
2652
|
};
|
|
@@ -2655,37 +2655,37 @@
|
|
|
2655
2655
|
...e,
|
|
2656
2656
|
[l]: t
|
|
2657
2657
|
};
|
|
2658
|
-
}),
|
|
2658
|
+
}), P?.onTestFileComplete({
|
|
2659
2659
|
...s,
|
|
2660
2660
|
runId: r
|
|
2661
2661
|
});
|
|
2662
2662
|
}
|
|
2663
2663
|
} else if ("fatal" === t.type) {
|
|
2664
2664
|
let e = t.payload;
|
|
2665
|
-
|
|
2665
|
+
p && x((e)=>({
|
|
2666
2666
|
...e,
|
|
2667
|
-
[
|
|
2668
|
-
})),
|
|
2667
|
+
[p]: "fail"
|
|
2668
|
+
})), P?.onFatal(e);
|
|
2669
2669
|
} else if ("log" === t.type) {
|
|
2670
2670
|
let e = t.payload;
|
|
2671
|
-
|
|
2671
|
+
P?.onLog(e);
|
|
2672
2672
|
} else if ("dispatch-rpc-request" === t.type) {
|
|
2673
2673
|
let s = t.payload;
|
|
2674
|
-
if (s.namespace
|
|
2674
|
+
if ("runner" === s.namespace && "file-ready" === s.method) {
|
|
2675
2675
|
let e = s.args;
|
|
2676
|
-
"string" == typeof e?.testPath && Array.isArray(e.tests) &&
|
|
2676
|
+
"string" == typeof e?.testPath && Array.isArray(e.tests) && U(e.testPath, e);
|
|
2677
2677
|
}
|
|
2678
|
-
if (s.namespace
|
|
2678
|
+
if ("runner" === s.namespace && "case-start" === s.method) {
|
|
2679
2679
|
let e = s.args;
|
|
2680
|
-
"string" == typeof e?.testPath && e.testId &&
|
|
2680
|
+
"string" == typeof e?.testPath && e.testId && T(e.testPath, e);
|
|
2681
2681
|
}
|
|
2682
2682
|
let l = ((e)=>{
|
|
2683
|
-
if (!
|
|
2683
|
+
if (!ev(e) || "browser" !== e.namespace || "rpc" !== e.method) return null;
|
|
2684
2684
|
let t = e.args;
|
|
2685
|
-
return
|
|
2685
|
+
return ev(t) && ey(t, "id") && ey(t, "kind") && ey(t, "method") && ey(t, "testPath") && ey(t, "runId") ? t : null;
|
|
2686
2686
|
})(s);
|
|
2687
2687
|
if (l) {
|
|
2688
|
-
let t =
|
|
2688
|
+
let t = eA(l.testPath), o = t ? eN(t) : void 0;
|
|
2689
2689
|
if (!o || l.runId !== o) {
|
|
2690
2690
|
let t, a;
|
|
2691
2691
|
null !== (t = e.source) && "function" == typeof t.postMessage && e.source.postMessage({
|
|
@@ -2699,22 +2699,22 @@
|
|
|
2699
2699
|
return;
|
|
2700
2700
|
}
|
|
2701
2701
|
}
|
|
2702
|
-
|
|
2702
|
+
ew(P, s, e.source);
|
|
2703
2703
|
}
|
|
2704
2704
|
}
|
|
2705
2705
|
};
|
|
2706
2706
|
return window.addEventListener("message", e), ()=>window.removeEventListener("message", e);
|
|
2707
2707
|
}, [
|
|
2708
|
-
|
|
2708
|
+
p,
|
|
2709
|
+
E,
|
|
2710
|
+
O,
|
|
2711
|
+
P,
|
|
2712
|
+
C,
|
|
2709
2713
|
U,
|
|
2710
|
-
|
|
2711
|
-
M,
|
|
2712
|
-
w,
|
|
2713
|
-
$,
|
|
2714
|
-
I
|
|
2714
|
+
T
|
|
2715
2715
|
]);
|
|
2716
|
-
let
|
|
2717
|
-
let e = Object.values(
|
|
2716
|
+
let L = (0, n.useMemo)(()=>{
|
|
2717
|
+
let e = Object.values(m).flatMap((e)=>Object.values(e));
|
|
2718
2718
|
return {
|
|
2719
2719
|
idle: e.filter((e)=>"idle" === e.status).length,
|
|
2720
2720
|
running: e.filter((e)=>"running" === e.status).length,
|
|
@@ -2723,18 +2723,18 @@
|
|
|
2723
2723
|
skip: e.filter((e)=>"skip" === e.status).length
|
|
2724
2724
|
};
|
|
2725
2725
|
}, [
|
|
2726
|
-
|
|
2727
|
-
]),
|
|
2728
|
-
|
|
2729
|
-
]),
|
|
2726
|
+
m
|
|
2727
|
+
]), q = (0, n.useMemo)(()=>Object.values(f).some((e)=>"running" === e), [
|
|
2728
|
+
f
|
|
2729
|
+
]), H = (0, n.useMemo)(()=>{
|
|
2730
2730
|
let e = [], t = [
|
|
2731
|
-
...new Set(
|
|
2731
|
+
...new Set(c.map((e)=>e.projectName))
|
|
2732
2732
|
];
|
|
2733
2733
|
if (t.length > 1) for (let s of t)e.push(`__project__${s}`);
|
|
2734
|
-
for (let t of
|
|
2734
|
+
for (let t of c){
|
|
2735
2735
|
let s = t.testPath;
|
|
2736
2736
|
e.push(s);
|
|
2737
|
-
let l = Object.values(
|
|
2737
|
+
let l = Object.values(m[s] ?? {}), r = new Set;
|
|
2738
2738
|
for (let e of l){
|
|
2739
2739
|
let t = e.parentNames;
|
|
2740
2740
|
for(let e = 1; e <= t.length; e++){
|
|
@@ -2755,38 +2755,38 @@
|
|
|
2755
2755
|
...new Set(e)
|
|
2756
2756
|
];
|
|
2757
2757
|
}, [
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
]),
|
|
2758
|
+
c,
|
|
2759
|
+
m
|
|
2760
|
+
]), J = t.projects?.[0]?.name || t.rootPath.split("/").filter(Boolean).pop() || "default", X = `rstest-split-${J}`, K = (0, n.useMemo)(()=>{
|
|
2761
2761
|
let e = new Map;
|
|
2762
2762
|
for (let s of t.projects ?? [])e.set(s.name, s.viewport);
|
|
2763
2763
|
return e;
|
|
2764
2764
|
}, [
|
|
2765
2765
|
t.projects
|
|
2766
|
-
]),
|
|
2767
|
-
if (!
|
|
2768
|
-
let e =
|
|
2766
|
+
]), Y = (0, n.useMemo)(()=>{
|
|
2767
|
+
if (!p) return t.projects?.[0]?.name;
|
|
2768
|
+
let e = c.find((e)=>e.testPath === p);
|
|
2769
2769
|
return e?.projectName ?? t.projects?.[0]?.name;
|
|
2770
2770
|
}, [
|
|
2771
|
-
|
|
2772
|
-
|
|
2771
|
+
p,
|
|
2772
|
+
c,
|
|
2773
2773
|
t.projects
|
|
2774
|
-
]),
|
|
2774
|
+
]), Q = (0, n.useMemo)(()=>Y ? F[Y] ?? em(K.get(Y)) : {
|
|
2775
2775
|
mode: "full"
|
|
2776
2776
|
}, [
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
]),
|
|
2781
|
-
|
|
2777
|
+
Y,
|
|
2778
|
+
F,
|
|
2779
|
+
K
|
|
2780
|
+
]), ee = (0, n.useCallback)((e)=>{
|
|
2781
|
+
Y && (S(Y, e), N((t)=>({
|
|
2782
2782
|
...t,
|
|
2783
|
-
[
|
|
2783
|
+
[Y]: e
|
|
2784
2784
|
})));
|
|
2785
2785
|
}, [
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
]),
|
|
2789
|
-
|
|
2786
|
+
Y,
|
|
2787
|
+
S
|
|
2788
|
+
]), et = (0, n.useCallback)((e, t)=>{
|
|
2789
|
+
N((s)=>{
|
|
2790
2790
|
let l = s[e];
|
|
2791
2791
|
if (!l || "responsive" !== l.mode || l.width === t.width && l.height === t.height) return s;
|
|
2792
2792
|
let r = {
|
|
@@ -2794,132 +2794,132 @@
|
|
|
2794
2794
|
width: t.width,
|
|
2795
2795
|
height: t.height
|
|
2796
2796
|
};
|
|
2797
|
-
return
|
|
2797
|
+
return S(e, r), {
|
|
2798
2798
|
...s,
|
|
2799
2799
|
[e]: r
|
|
2800
2800
|
};
|
|
2801
2801
|
});
|
|
2802
2802
|
}, [
|
|
2803
|
-
|
|
2803
|
+
S
|
|
2804
2804
|
]);
|
|
2805
2805
|
return (0, l.jsx)("div", {
|
|
2806
2806
|
className: "m-0 h-screen w-full overflow-hidden p-0",
|
|
2807
2807
|
style: {
|
|
2808
|
-
background:
|
|
2808
|
+
background: i.colorBgContainer
|
|
2809
2809
|
},
|
|
2810
|
-
children: (0, l.jsxs)(
|
|
2810
|
+
children: (0, l.jsxs)(G, {
|
|
2811
2811
|
direction: "horizontal",
|
|
2812
2812
|
className: "h-full w-full",
|
|
2813
|
-
autoSaveId:
|
|
2813
|
+
autoSaveId: X,
|
|
2814
2814
|
children: [
|
|
2815
|
-
(0, l.jsx)(
|
|
2815
|
+
(0, l.jsx)(Z, {
|
|
2816
2816
|
defaultSize: 32,
|
|
2817
2817
|
minSize: 20,
|
|
2818
2818
|
maxSize: 50,
|
|
2819
2819
|
children: (0, l.jsxs)("div", {
|
|
2820
2820
|
className: "flex h-full flex-col overflow-hidden",
|
|
2821
2821
|
style: {
|
|
2822
|
-
background:
|
|
2822
|
+
background: i.colorBgContainer
|
|
2823
2823
|
},
|
|
2824
2824
|
children: [
|
|
2825
|
-
(0, l.jsx)(
|
|
2825
|
+
(0, l.jsx)(V, {
|
|
2826
2826
|
theme: s,
|
|
2827
|
-
onThemeToggle:
|
|
2828
|
-
isConnected:
|
|
2829
|
-
token:
|
|
2830
|
-
counts:
|
|
2831
|
-
}),
|
|
2832
|
-
(0, l.jsx)(
|
|
2833
|
-
token:
|
|
2834
|
-
filterText:
|
|
2835
|
-
onFilterChange:
|
|
2836
|
-
isAllExpanded:
|
|
2827
|
+
onThemeToggle: a,
|
|
2828
|
+
isConnected: z,
|
|
2829
|
+
token: i,
|
|
2830
|
+
counts: L
|
|
2831
|
+
}),
|
|
2832
|
+
(0, l.jsx)(el, {
|
|
2833
|
+
token: i,
|
|
2834
|
+
filterText: y,
|
|
2835
|
+
onFilterChange: _,
|
|
2836
|
+
isAllExpanded: H.length > 0 && H.every((e)=>j.includes(e)),
|
|
2837
2837
|
onToggleExpandAll: ()=>{
|
|
2838
|
-
|
|
2838
|
+
H.length > 0 && H.every((e)=>j.includes(e)) ? v([]) : v(H);
|
|
2839
2839
|
},
|
|
2840
|
-
onRerun:
|
|
2841
|
-
counts:
|
|
2842
|
-
isRunning:
|
|
2840
|
+
onRerun: z ? D : void 0,
|
|
2841
|
+
counts: L,
|
|
2842
|
+
isRunning: q
|
|
2843
2843
|
}),
|
|
2844
2844
|
(0, l.jsx)("div", {
|
|
2845
2845
|
className: "flex-1 overflow-x-hidden overflow-y-auto",
|
|
2846
2846
|
style: {
|
|
2847
|
-
background:
|
|
2847
|
+
background: i.colorBgContainer
|
|
2848
2848
|
},
|
|
2849
|
-
children: (0, l.jsx)(
|
|
2850
|
-
testFiles:
|
|
2851
|
-
statusMap:
|
|
2852
|
-
caseMap:
|
|
2849
|
+
children: (0, l.jsx)(ex, {
|
|
2850
|
+
testFiles: c,
|
|
2851
|
+
statusMap: f,
|
|
2852
|
+
caseMap: m,
|
|
2853
2853
|
rootPath: t.rootPath,
|
|
2854
2854
|
projects: t.projects,
|
|
2855
|
-
loading:
|
|
2856
|
-
connected:
|
|
2857
|
-
openFiles:
|
|
2858
|
-
activeFile:
|
|
2859
|
-
token:
|
|
2860
|
-
filterText:
|
|
2861
|
-
onExpandChange:
|
|
2862
|
-
onSelect:
|
|
2863
|
-
onRerunFile:
|
|
2864
|
-
onRerunTestCase:
|
|
2855
|
+
loading: M,
|
|
2856
|
+
connected: z,
|
|
2857
|
+
openFiles: j,
|
|
2858
|
+
activeFile: p,
|
|
2859
|
+
token: i,
|
|
2860
|
+
filterText: y,
|
|
2861
|
+
onExpandChange: v,
|
|
2862
|
+
onSelect: R,
|
|
2863
|
+
onRerunFile: I,
|
|
2864
|
+
onRerunTestCase: B
|
|
2865
2865
|
})
|
|
2866
2866
|
})
|
|
2867
2867
|
]
|
|
2868
2868
|
})
|
|
2869
2869
|
}),
|
|
2870
|
-
(0, l.jsx)(
|
|
2870
|
+
(0, l.jsx)(Z, {
|
|
2871
2871
|
defaultSize: 68,
|
|
2872
2872
|
minSize: 40,
|
|
2873
2873
|
children: (0, l.jsxs)("div", {
|
|
2874
2874
|
className: "flex h-full flex-col overflow-hidden",
|
|
2875
2875
|
style: {
|
|
2876
|
-
background:
|
|
2876
|
+
background: i.colorBgLayout
|
|
2877
2877
|
},
|
|
2878
2878
|
children: [
|
|
2879
|
-
(0, l.jsx)(
|
|
2880
|
-
token:
|
|
2881
|
-
activeFile:
|
|
2879
|
+
(0, l.jsx)(W, {
|
|
2880
|
+
token: i,
|
|
2881
|
+
activeFile: p ?? void 0,
|
|
2882
2882
|
rootPath: t.rootPath,
|
|
2883
|
-
status:
|
|
2884
|
-
viewport:
|
|
2885
|
-
onViewportChange:
|
|
2883
|
+
status: p ? f[p] ?? "idle" : void 0,
|
|
2884
|
+
viewport: Y ? Q : void 0,
|
|
2885
|
+
onViewportChange: Y ? ee : void 0
|
|
2886
2886
|
}),
|
|
2887
2887
|
(0, l.jsxs)("div", {
|
|
2888
2888
|
className: "relative min-h-0 flex-1 overflow-auto",
|
|
2889
2889
|
style: {
|
|
2890
|
-
background:
|
|
2890
|
+
background: i.colorBgLayout
|
|
2891
2891
|
},
|
|
2892
2892
|
children: [
|
|
2893
|
-
!
|
|
2893
|
+
!p && (0, l.jsx)(d, {
|
|
2894
2894
|
message: "Select a test file on the left to view its run output"
|
|
2895
2895
|
}),
|
|
2896
|
-
|
|
2896
|
+
c.map((e)=>{
|
|
2897
2897
|
var s;
|
|
2898
|
-
let r, o, a,
|
|
2899
|
-
return r = e.testPath ===
|
|
2898
|
+
let r, o, a, n;
|
|
2899
|
+
return r = e.testPath === p, o = C[e.testPath], a = F[e.projectName] ?? em(K.get(e.projectName)), (0, l.jsx)("div", {
|
|
2900
2900
|
className: "h-full w-full",
|
|
2901
2901
|
style: {
|
|
2902
2902
|
display: r ? "block" : "none"
|
|
2903
2903
|
},
|
|
2904
|
-
children: (0, l.jsx)(
|
|
2905
|
-
token:
|
|
2904
|
+
children: (0, l.jsx)(ej, {
|
|
2905
|
+
token: i,
|
|
2906
2906
|
selection: a,
|
|
2907
2907
|
active: r,
|
|
2908
|
-
onResponsiveResize: "responsive" === a.mode ? (t)=>
|
|
2908
|
+
onResponsiveResize: "responsive" === a.mode ? (t)=>et(e.projectName, t) : void 0,
|
|
2909
2909
|
"data-testid": "responsive" === a.mode ? "viewport-resizer" : void 0,
|
|
2910
2910
|
"data-test-project": e.projectName,
|
|
2911
2911
|
"data-test-file": e.testPath,
|
|
2912
2912
|
children: (0, l.jsx)("iframe", {
|
|
2913
2913
|
"data-test-file": e.testPath,
|
|
2914
|
-
title: `Test runner for ${(
|
|
2915
|
-
src: o ?
|
|
2914
|
+
title: `Test runner for ${(n = (s = e.testPath).split("/"))[n.length - 1] || s}`,
|
|
2915
|
+
src: o ? ek(e.testPath, t.runnerUrl, void 0, !1, o) : "about:blank",
|
|
2916
2916
|
className: "block h-full w-full border-0",
|
|
2917
2917
|
style: {
|
|
2918
|
-
background:
|
|
2918
|
+
background: i.colorBgContainer
|
|
2919
2919
|
},
|
|
2920
2920
|
onLoad: (s)=>{
|
|
2921
2921
|
if (!o) return;
|
|
2922
|
-
let l = s.currentTarget, r =
|
|
2922
|
+
let l = s.currentTarget, r = eN(l) ?? o;
|
|
2923
2923
|
l.contentWindow && l.contentWindow.postMessage({
|
|
2924
2924
|
type: "RSTEST_CONFIG",
|
|
2925
2925
|
payload: {
|
|
@@ -2941,19 +2941,19 @@
|
|
|
2941
2941
|
]
|
|
2942
2942
|
})
|
|
2943
2943
|
});
|
|
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,
|
|
2944
|
+
}, eM = ()=>{
|
|
2945
|
+
let e = window.__RSTEST_BROWSER_OPTIONS__, [t, s] = (0, n.useState)("dark"), [r, c] = (0, n.useState)("dark");
|
|
2946
|
+
(0, n.useEffect)(()=>{
|
|
2947
|
+
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e)=>c(e.matches ? "dark" : "light");
|
|
2948
|
+
return c(e.matches ? "dark" : "light"), e.addEventListener("change", t), ()=>e.removeEventListener("change", t);
|
|
2949
|
+
}, []), (0, n.useEffect)(()=>{
|
|
2950
2950
|
try {
|
|
2951
2951
|
let e = window.localStorage.getItem("rstest-theme");
|
|
2952
2952
|
("light" === e || "dark" === e || "system" === e) && s(e);
|
|
2953
2953
|
} catch {}
|
|
2954
2954
|
}, []);
|
|
2955
2955
|
let d = "system" === t ? r : t;
|
|
2956
|
-
if ((0,
|
|
2956
|
+
if ((0, n.useEffect)(()=>{
|
|
2957
2957
|
document.body.dataset.theme = d;
|
|
2958
2958
|
try {
|
|
2959
2959
|
window.localStorage.setItem("rstest-theme", t);
|
|
@@ -2966,14 +2966,14 @@
|
|
|
2966
2966
|
children: "Missing browser options"
|
|
2967
2967
|
});
|
|
2968
2968
|
let u = "dark" === d, p = e.projects?.[0]?.name || e.rootPath.split("/").filter(Boolean).pop() || "rstest";
|
|
2969
|
-
return (0,
|
|
2969
|
+
return (0, n.useEffect)(()=>{
|
|
2970
2970
|
document.title = `${p} [RSTEST BROWSER]`;
|
|
2971
2971
|
}, [
|
|
2972
2972
|
p
|
|
2973
|
-
]), (0, l.jsx)(
|
|
2973
|
+
]), (0, l.jsx)(a.Ay, {
|
|
2974
2974
|
componentSize: "small",
|
|
2975
2975
|
theme: {
|
|
2976
|
-
algorithm: u ?
|
|
2976
|
+
algorithm: u ? o.A.darkAlgorithm : o.A.defaultAlgorithm,
|
|
2977
2977
|
token: {
|
|
2978
2978
|
fontFamily: '"Inter",system-ui,-apple-system,"Segoe UI",sans-serif',
|
|
2979
2979
|
fontFamilyCode: '"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
@@ -2985,21 +2985,21 @@
|
|
|
2985
2985
|
borderRadius: 6
|
|
2986
2986
|
}
|
|
2987
2987
|
},
|
|
2988
|
-
children: (0, l.jsx)(
|
|
2989
|
-
children: (0, l.jsx)(
|
|
2988
|
+
children: (0, l.jsx)(i.A, {
|
|
2989
|
+
children: (0, l.jsx)(eP, {
|
|
2990
2990
|
options: e,
|
|
2991
2991
|
theme: t,
|
|
2992
2992
|
setTheme: s
|
|
2993
2993
|
})
|
|
2994
2994
|
})
|
|
2995
2995
|
});
|
|
2996
|
-
},
|
|
2996
|
+
}, ez = ()=>{
|
|
2997
2997
|
let e = document.getElementById("root");
|
|
2998
|
-
e &&
|
|
2999
|
-
children: (0, l.jsx)(
|
|
2998
|
+
e && c.createRoot(e).render((0, l.jsx)(n.StrictMode, {
|
|
2999
|
+
children: (0, l.jsx)(eM, {})
|
|
3000
3000
|
}));
|
|
3001
3001
|
};
|
|
3002
|
-
"loading" === document.readyState ? document.addEventListener("DOMContentLoaded",
|
|
3002
|
+
"loading" === document.readyState ? document.addEventListener("DOMContentLoaded", ez) : ez();
|
|
3003
3003
|
}
|
|
3004
3004
|
}, i = {};
|
|
3005
3005
|
function n(e) {
|
|
@@ -3025,11 +3025,14 @@
|
|
|
3025
3025
|
o[e] = ()=>s[e];
|
|
3026
3026
|
});
|
|
3027
3027
|
return o.default = ()=>s, n.d(r, o), r;
|
|
3028
|
-
}, n.d = (e, t)=>{
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3028
|
+
}, n.d = (e, t, s)=>{
|
|
3029
|
+
var l = (t, s)=>{
|
|
3030
|
+
for(var l in t)n.o(t, l) && !n.o(e, l) && Object.defineProperty(e, l, {
|
|
3031
|
+
enumerable: !0,
|
|
3032
|
+
[s]: t[l]
|
|
3033
|
+
});
|
|
3034
|
+
};
|
|
3035
|
+
l(t, "get"), l(s, "value");
|
|
3033
3036
|
}, n.o = (e, t)=>Object.prototype.hasOwnProperty.call(e, t), n.r = (e)=>{
|
|
3034
3037
|
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
|
|
3035
3038
|
value: "Module"
|
|
@@ -3069,7 +3072,7 @@
|
|
|
3069
3072
|
}, (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
3073
|
var c = n.O(void 0, [
|
|
3071
3074
|
"783",
|
|
3072
|
-
"
|
|
3073
|
-
], ()=>n(
|
|
3075
|
+
"27"
|
|
3076
|
+
], ()=>n(7116));
|
|
3074
3077
|
c = n.O(c);
|
|
3075
3078
|
})();
|