@molecule/app-ide-react 1.13.0 → 1.14.0
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/README.md +504 -1
- package/dist/command-metadata.d.ts.map +1 -1
- package/dist/command-metadata.js +7 -2
- package/dist/command-metadata.js.map +1 -1
- package/dist/components/ChatPanel.d.ts +9 -1
- package/dist/components/ChatPanel.d.ts.map +1 -1
- package/dist/components/ChatPanel.js +142 -18
- package/dist/components/ChatPanel.js.map +1 -1
- package/dist/components/TestsBar.d.ts +55 -0
- package/dist/components/TestsBar.d.ts.map +1 -0
- package/dist/components/TestsBar.js +296 -0
- package/dist/components/TestsBar.js.map +1 -0
- package/dist/components/TestsCard.d.ts +67 -0
- package/dist/components/TestsCard.d.ts.map +1 -0
- package/dist/components/TestsCard.js +185 -0
- package/dist/components/TestsCard.js.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/tests-bar-utilities.d.ts +129 -0
- package/dist/components/tests-bar-utilities.d.ts.map +1 -0
- package/dist/components/tests-bar-utilities.js +236 -0
- package/dist/components/tests-bar-utilities.js.map +1 -0
- package/dist/components/tests-card-utilities.d.ts +145 -0
- package/dist/components/tests-card-utilities.d.ts.map +1 -0
- package/dist/components/tests-card-utilities.js +262 -0
- package/dist/components/tests-card-utilities.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +136 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { t } from '@molecule/app-i18n';
|
|
4
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
5
|
+
import { chatCardStyle } from './chat-card-style.js';
|
|
6
|
+
import { countByKind, filterTests, groupTests, isRowRunning, summarizeResults, testRowLabel, } from './tests-card-utilities.js';
|
|
7
|
+
/**
|
|
8
|
+
* Human label for a kind.
|
|
9
|
+
*
|
|
10
|
+
* @param kind - The kind.
|
|
11
|
+
* @returns The translated label.
|
|
12
|
+
*/
|
|
13
|
+
function kindLabel(kind) {
|
|
14
|
+
return kind === 'e2e'
|
|
15
|
+
? t('ide.tests.kind.e2e', undefined, { defaultValue: 'End-to-end' })
|
|
16
|
+
: t('ide.tests.kind.unit', undefined, { defaultValue: 'Unit' });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The heading for one group: its kind and the directory that owns it. The
|
|
20
|
+
* workspace ROOT has no name of its own, so it gets the generic word.
|
|
21
|
+
*
|
|
22
|
+
* @param group - The group.
|
|
23
|
+
* @returns The heading text.
|
|
24
|
+
*/
|
|
25
|
+
function groupHeading(group) {
|
|
26
|
+
const where = group.label ?? t('ide.tests.workspace.root', undefined, { defaultValue: 'Project' });
|
|
27
|
+
return `${kindLabel(group.kind)} · ${where}`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The short label a status pill shows.
|
|
31
|
+
*
|
|
32
|
+
* @param status - The status.
|
|
33
|
+
* @returns The translated label.
|
|
34
|
+
*/
|
|
35
|
+
function statusLabel(status) {
|
|
36
|
+
if (status === 'passed')
|
|
37
|
+
return t('ide.tests.statusPassed', undefined, { defaultValue: 'Passed' });
|
|
38
|
+
if (status === 'failed')
|
|
39
|
+
return t('ide.tests.statusFailed', undefined, { defaultValue: 'Failed' });
|
|
40
|
+
return t('ide.tests.statusSkipped', undefined, { defaultValue: 'Skipped' });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The tests browser shown by `/test`.
|
|
44
|
+
*
|
|
45
|
+
* @param props - See {@link TestsCardProps}.
|
|
46
|
+
* @returns The rendered tests card.
|
|
47
|
+
*/
|
|
48
|
+
export function TestsCard({ tests, status, run, initialQuery, canRun, onRun, onCancel, isLight, embedded, }) {
|
|
49
|
+
const cm = getClassMap();
|
|
50
|
+
const [query, setQuery] = useState(initialQuery);
|
|
51
|
+
const outputRef = useRef(null);
|
|
52
|
+
// Keep the live output pinned to the newest line unless the reader scrolled up
|
|
53
|
+
// inside the block themselves.
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
const el = outputRef.current;
|
|
56
|
+
if (!el)
|
|
57
|
+
return;
|
|
58
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight > 40)
|
|
59
|
+
return;
|
|
60
|
+
el.scrollTop = el.scrollHeight;
|
|
61
|
+
}, [run.output]);
|
|
62
|
+
const filtered = useMemo(() => filterTests(tests, query), [tests, query]);
|
|
63
|
+
const groups = useMemo(() => groupTests(filtered), [filtered]);
|
|
64
|
+
const counts = useMemo(() => countByKind(filtered), [filtered]);
|
|
65
|
+
const summary = useMemo(() => summarizeResults(filtered, run.results), [filtered, run.results]);
|
|
66
|
+
const rowBorder = isLight ? 'rgba(0,0,0,0.08)' : 'rgba(255,255,255,0.08)';
|
|
67
|
+
// The same neutral inset the sibling cards give their fields, so the search
|
|
68
|
+
// box READS as a field on the clean overlay surface.
|
|
69
|
+
const fieldBg = isLight ? 'rgba(0,0,0,0.05)' : 'rgba(255,255,255,0.06)';
|
|
70
|
+
const fieldStyle = {
|
|
71
|
+
width: '100%',
|
|
72
|
+
padding: '4px 6px',
|
|
73
|
+
borderRadius: 4,
|
|
74
|
+
border: `1px solid ${rowBorder}`,
|
|
75
|
+
background: fieldBg,
|
|
76
|
+
color: 'inherit',
|
|
77
|
+
outline: 'none',
|
|
78
|
+
};
|
|
79
|
+
const disabledReason = !canRun
|
|
80
|
+
? t('ide.tests.viewerCannotRun', undefined, {
|
|
81
|
+
defaultValue: 'Only editors can run this project’s tests.',
|
|
82
|
+
})
|
|
83
|
+
: status === 'unavailable'
|
|
84
|
+
? t('ide.tests.needsSandbox', undefined, {
|
|
85
|
+
defaultValue: 'Start the project to run its tests.',
|
|
86
|
+
})
|
|
87
|
+
: null;
|
|
88
|
+
const runnable = canRun && status === 'ready' && !run.running;
|
|
89
|
+
return (_jsxs("div", { "data-mol-id": "tests-card", className: cm.textSize('xs'), style: embedded ? { padding: '10px 12px' } : { ...chatCardStyle(), marginBottom: 16 }, children: [_jsxs("div", { style: {
|
|
90
|
+
display: 'flex',
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
justifyContent: 'space-between',
|
|
93
|
+
gap: 8,
|
|
94
|
+
marginBottom: 6,
|
|
95
|
+
flexWrap: 'wrap',
|
|
96
|
+
}, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8, flexShrink: 0 }, children: [!embedded && (_jsx("div", { className: cm.cn(cm.fontWeight('medium'), cm.textSize('sm')), style: { flexShrink: 0 }, children: t('ide.tests.heading', undefined, { defaultValue: 'Tests' }) })), run.running ? (_jsxs("span", { "data-mol-id": "tests-card-running", className: cm.cn(cm.textMuted, cm.textSize('xs')), style: { display: 'inline-flex', alignItems: 'center', gap: 4 }, children: [_jsx("span", { className: cm.spinner({ size: 'xs' }), "aria-hidden": "true" }), t('ide.tests.running', undefined, { defaultValue: 'Running…' })] })) : (summary.reported > 0 && (_jsxs("span", { "data-mol-id": "tests-card-summary", className: cm.textSize('xs'), style: { display: 'inline-flex', alignItems: 'center', gap: 6 }, children: [summary.passed > 0 && (_jsx("span", { className: cm.textSuccess, children: t('ide.tests.passedCount', { count: summary.passed }, { defaultValue: '{{count}} passed' }) })), summary.failed > 0 && (_jsx("span", { className: cm.textError, children: t('ide.tests.failedCount', { count: summary.failed }, { defaultValue: '{{count}} failed' }) }))] })))] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6, flexWrap: 'wrap' }, children: [counts.e2e > 0 && counts.unit > 0 && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", "data-mol-id": "tests-card-run-e2e", onClick: () => onRun({ ids: idsOfKind(filtered, 'e2e') }), disabled: !runnable, title: disabledReason ?? undefined, className: cm.cn(cm.button({ variant: 'ghost', size: 'xs' })), style: { flexShrink: 0 }, children: t('ide.tests.runE2e', undefined, { defaultValue: 'Run e2e' }) }), _jsx("button", { type: "button", "data-mol-id": "tests-card-run-unit", onClick: () => onRun({ ids: idsOfKind(filtered, 'unit') }), disabled: !runnable, title: disabledReason ?? undefined, className: cm.cn(cm.button({ variant: 'ghost', size: 'xs' })), style: { flexShrink: 0 }, children: t('ide.tests.runUnit', undefined, { defaultValue: 'Run unit' }) })] })), run.running ? (_jsx("button", { type: "button", "data-mol-id": "tests-card-cancel", onClick: onCancel, className: cm.cn(cm.button({ variant: 'solid', color: 'secondary', size: 'xs' })), style: { flexShrink: 0 }, children: t('ide.tests.stop', undefined, { defaultValue: 'Stop' }) })) : (filtered.length > 0 && (_jsx("button", { type: "button", "data-mol-id": "tests-card-run-all", onClick: () => onRun({ ids: filtered.map((test) => test.id) }), disabled: !runnable, title: disabledReason ?? undefined, className: cm.cn(cm.button({ variant: 'solid', color: 'primary', size: 'xs' })), style: { flexShrink: 0 }, children: t('ide.tests.runAll', undefined, { defaultValue: 'Run all' }) })))] })] }), _jsx("input", { value: query, "data-mol-id": "tests-card-search", onChange: (e) => setQuery(e.target.value), placeholder: t('ide.tests.searchPlaceholder', undefined, {
|
|
97
|
+
defaultValue: 'Filter tests…',
|
|
98
|
+
}), className: cm.textSize('xs'), style: { ...fieldStyle, marginBottom: 6 } }), disabledReason && status !== 'loading' && (_jsx("div", { "data-mol-id": "tests-card-disabled-reason", className: cm.textMuted, children: disabledReason })), status === 'loading' && (_jsx("div", { className: cm.textMuted, style: { padding: '6px 0' }, children: t('ide.tests.loading', undefined, { defaultValue: 'Loading tests…' }) })), status === 'unavailable' && (_jsx("div", { "data-mol-id": "tests-card-unavailable", className: cm.textMuted, style: { padding: '6px 0' }, children: t('ide.tests.waitingForSandbox', undefined, {
|
|
99
|
+
defaultValue: 'Start the project to see its tests.',
|
|
100
|
+
}) })), status === 'error' && (_jsx("div", { "data-mol-id": "tests-card-error", className: cm.textMuted, style: { padding: '6px 0' }, children: t('ide.tests.listError', undefined, {
|
|
101
|
+
defaultValue: 'Could not list this project’s tests.',
|
|
102
|
+
}) })), status === 'ready' && filtered.length === 0 && (_jsx("div", { "data-mol-id": "tests-card-empty", className: cm.textMuted, style: { padding: '6px 0' }, children: query.trim()
|
|
103
|
+
? t('ide.tests.noMatch', undefined, {
|
|
104
|
+
defaultValue: 'No tests match your search.',
|
|
105
|
+
})
|
|
106
|
+
: t('ide.tests.empty', undefined, {
|
|
107
|
+
defaultValue: 'No tests in this project yet.',
|
|
108
|
+
}) })), status === 'ready' &&
|
|
109
|
+
groups.map((group) => (_jsx(TestsCardGroup, { group: group, run: run, runnable: runnable, disabledReason: disabledReason, rowBorder: rowBorder, onRun: onRun }, `${group.kind}:${group.workspace}`))), run.output.length > 0 && (_jsx("div", { "data-mol-id": "tests-card-output-area", style: { marginTop: 6 }, children: _jsx("pre", { ref: outputRef, "data-mol-id": "tests-card-output", className: cm.textSize('xs'), style: {
|
|
110
|
+
margin: 0,
|
|
111
|
+
padding: '6px 8px',
|
|
112
|
+
borderRadius: 4,
|
|
113
|
+
border: `1px solid ${rowBorder}`,
|
|
114
|
+
whiteSpace: 'pre-wrap',
|
|
115
|
+
wordBreak: 'break-word',
|
|
116
|
+
maxHeight: 200,
|
|
117
|
+
overflow: 'auto',
|
|
118
|
+
fontFamily: 'var(--mol-font-mono, monospace)',
|
|
119
|
+
}, children: run.output.join('\n') }) })), run.error && (_jsx("div", { "data-mol-id": "tests-card-run-error", className: cm.textError, style: { marginTop: 6 }, children: run.error })), !run.running && run.outcome === 'cancelled' && !run.error && (_jsx("div", { "data-mol-id": "tests-card-cancelled", className: cm.textMuted, style: { marginTop: 6 }, children: t('ide.tests.cancelled', undefined, { defaultValue: 'Run stopped.' }) }))] }));
|
|
120
|
+
}
|
|
121
|
+
TestsCard.displayName = 'TestsCard';
|
|
122
|
+
/**
|
|
123
|
+
* The ids of every listed test of one kind.
|
|
124
|
+
*
|
|
125
|
+
* @param tests - The (filtered) tests.
|
|
126
|
+
* @param kind - The kind to select.
|
|
127
|
+
* @returns Their ids.
|
|
128
|
+
*/
|
|
129
|
+
function idsOfKind(tests, kind) {
|
|
130
|
+
return tests.filter((test) => test.kind === kind).map((test) => test.id);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* One group of rows — a heading ("End-to-end · my-app/app"), a Run for the
|
|
134
|
+
* whole group, and a row per test file.
|
|
135
|
+
*
|
|
136
|
+
* @param props - See {@link TestsCardGroupProps}.
|
|
137
|
+
* @returns The rendered group.
|
|
138
|
+
*/
|
|
139
|
+
function TestsCardGroup({ group, run, runnable, disabledReason, rowBorder, onRun, }) {
|
|
140
|
+
const cm = getClassMap();
|
|
141
|
+
const groupId = `${group.kind}-${group.workspace}`;
|
|
142
|
+
return (_jsxs("div", { "data-mol-id": `tests-card-group-${groupId}`, className: cm.borderT, style: { padding: '6px 0', borderColor: rowBorder }, children: [_jsxs("div", { style: {
|
|
143
|
+
display: 'flex',
|
|
144
|
+
alignItems: 'center',
|
|
145
|
+
justifyContent: 'space-between',
|
|
146
|
+
gap: 8,
|
|
147
|
+
flexWrap: 'wrap',
|
|
148
|
+
}, children: [_jsx("div", { className: cm.cn(cm.fontWeight('medium')), style: { minWidth: 0 }, children: groupHeading(group) }), _jsx("button", { type: "button", "data-mol-id": `tests-card-run-group-${groupId}`, onClick: () => onRun({ ids: group.items.map((item) => item.id) }), disabled: !runnable, title: disabledReason ?? undefined, className: cm.cn(cm.button({ variant: 'ghost', size: 'xs' })), style: { flexShrink: 0 }, children: t('ide.tests.runGroup', undefined, { defaultValue: 'Run group' }) })] }), group.kind === 'e2e' && (_jsx("div", { "data-mol-id": "tests-card-e2e-hint", className: cm.textMuted, style: { lineHeight: 1.4 }, children: t('ide.tests.e2eHint', undefined, {
|
|
149
|
+
defaultValue: 'These run against the live preview, so keep the preview open.',
|
|
150
|
+
}) })), group.items.map((item) => (_jsx(TestsCardRow, { item: item, result: run.results[item.id], running: isRowRunning(run, item.id), runnable: runnable, disabledReason: disabledReason, rowBorder: rowBorder, onRun: onRun }, item.id)))] }));
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* One test file: its label, its last status pill, a Run button, and — when it
|
|
154
|
+
* FAILED — the runner's output kept underneath, the same inline output
|
|
155
|
+
* ScriptsCard shows for a script that exited non-zero.
|
|
156
|
+
*
|
|
157
|
+
* @param props - See {@link TestsCardRowProps}.
|
|
158
|
+
* @returns The rendered row.
|
|
159
|
+
*/
|
|
160
|
+
function TestsCardRow({ item, result, running, runnable, disabledReason, rowBorder, onRun, }) {
|
|
161
|
+
const cm = getClassMap();
|
|
162
|
+
return (_jsxs("div", { "data-mol-id": `tests-card-row-${item.id}`, style: { padding: '4px 0' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }, children: [_jsx("div", { className: cm.textMuted, title: item.file, style: {
|
|
163
|
+
flex: '1 1 140px',
|
|
164
|
+
minWidth: 0,
|
|
165
|
+
overflow: 'hidden',
|
|
166
|
+
textOverflow: 'ellipsis',
|
|
167
|
+
whiteSpace: 'nowrap',
|
|
168
|
+
fontFamily: 'var(--mol-font-mono, monospace)',
|
|
169
|
+
}, children: testRowLabel(item) }), running ? (_jsxs("span", { "data-mol-id": `tests-card-status-${item.id}`, className: cm.textMuted, style: { display: 'inline-flex', alignItems: 'center', gap: 4, flexShrink: 0 }, children: [_jsx("span", { className: cm.spinner({ size: 'xs' }), "aria-hidden": "true" }), t('ide.tests.running', undefined, { defaultValue: 'Running…' })] })) : (result && (_jsx("span", { "data-mol-id": `tests-card-status-${item.id}`, className: result.status === 'passed'
|
|
170
|
+
? cm.textSuccess
|
|
171
|
+
: result.status === 'failed'
|
|
172
|
+
? cm.textError
|
|
173
|
+
: cm.textMuted, style: { flexShrink: 0 }, children: statusLabel(result.status) }))), _jsx("button", { type: "button", "data-mol-id": `tests-card-run-${item.id}`, onClick: () => onRun({ ids: [item.id] }), disabled: !runnable, title: disabledReason ?? undefined, className: cm.cn(cm.button({ variant: 'solid', color: 'primary', size: 'xs' })), style: { flexShrink: 0 }, children: t('ide.tests.run', undefined, { defaultValue: 'Run' }) })] }), result?.status === 'failed' && result.output && (_jsx("pre", { "data-mol-id": `tests-card-failure-${item.id}`, className: cm.textSize('xs'), style: {
|
|
174
|
+
margin: '4px 0 0',
|
|
175
|
+
padding: '6px 8px',
|
|
176
|
+
borderRadius: 4,
|
|
177
|
+
border: `1px solid ${rowBorder}`,
|
|
178
|
+
whiteSpace: 'pre-wrap',
|
|
179
|
+
wordBreak: 'break-word',
|
|
180
|
+
maxHeight: 200,
|
|
181
|
+
overflow: 'auto',
|
|
182
|
+
fontFamily: 'var(--mol-font-mono, monospace)',
|
|
183
|
+
}, children: result.output }))] }));
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=TestsCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestsCard.js","sourceRoot":"","sources":["../../src/components/TestsCard.tsx"],"names":[],"mappings":";AAgCA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE5D,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,GACb,MAAM,2BAA2B,CAAA;AA2BlC;;;;;GAKG;AACH,SAAS,SAAS,CAAC,IAAc;IAC/B,OAAO,IAAI,KAAK,KAAK;QACnB,CAAC,CAAC,CAAC,CAAC,oBAAoB,EAAE,SAAS,EAAE,EAAE,YA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QAAQ,EAAE,MAAM;oBAChB,UAAU,EAAE,iCAAiC;iBAC9C,YAEA,MAAM,CAAC,MAAM,GACV,CACP,IACG,CACP,CAAA;AACH,CAAC"}
|
|
@@ -30,6 +30,9 @@ export { ShareLinkManager } from './ShareLinkManager.js';
|
|
|
30
30
|
export { ShareModal } from './ShareModal.js';
|
|
31
31
|
export { SidebarTabs } from './SidebarTabs.js';
|
|
32
32
|
export { TabBar } from './TabBar.js';
|
|
33
|
+
export * from './tests-card-utilities.js';
|
|
34
|
+
export type { TestsCardProps, TestsStatus } from './TestsCard.js';
|
|
35
|
+
export { TestsCard } from './TestsCard.js';
|
|
33
36
|
export { ToolCallCard } from './ToolCallCard.js';
|
|
34
37
|
export * from './user-avatar-utilities.js';
|
|
35
38
|
export type { UserAvatarProps } from './UserAvatar.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,yBAAyB,CAAA;AACvC,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,cAAc,mBAAmB,CAAA;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1C,OAA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,EAAE,MAAM,iBAAiB,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -28,6 +28,8 @@ export { ShareLinkManager } from './ShareLinkManager.js';
|
|
|
28
28
|
export { ShareModal } from './ShareModal.js';
|
|
29
29
|
export { SidebarTabs } from './SidebarTabs.js';
|
|
30
30
|
export { TabBar } from './TabBar.js';
|
|
31
|
+
export * from './tests-card-utilities.js';
|
|
32
|
+
export { TestsCard } from './TestsCard.js';
|
|
31
33
|
export { ToolCallCard } from './ToolCallCard.js';
|
|
32
34
|
export * from './user-avatar-utilities.js';
|
|
33
35
|
export { UserAvatar } from './UserAvatar.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,yBAAyB,CAAA;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,cAAc,mBAAmB,CAAA;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;A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EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,cAAc,2BAA2B,CAAA;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,cAAc,4BAA4B,CAAA;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure state + grouping helpers for the {@link TestsBar}.
|
|
3
|
+
*
|
|
4
|
+
* Everything here is a plain function over plain data, so the bar's behaviour
|
|
5
|
+
* (which rows a group runs, how a streamed event moves the run forward, what
|
|
6
|
+
* the collapsed summary says) is unit-testable without rendering anything.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { TestItem, TestKind, TestRunEvent, TestRunOutcome, TestStatus, TestWorkspace } from '../types.js';
|
|
11
|
+
/** One rendered group of rows: a kind within a project directory. */
|
|
12
|
+
export interface TestGroup {
|
|
13
|
+
kind: TestKind;
|
|
14
|
+
workspace: TestWorkspace;
|
|
15
|
+
/** The directory's name for the heading; `null` for the workspace root. */
|
|
16
|
+
label: string | null;
|
|
17
|
+
items: TestItem[];
|
|
18
|
+
}
|
|
19
|
+
/** What one test file ended as in the last run. */
|
|
20
|
+
export interface TestResultEntry {
|
|
21
|
+
status: TestStatus;
|
|
22
|
+
durationMs?: number;
|
|
23
|
+
passed: number;
|
|
24
|
+
failed: number;
|
|
25
|
+
skipped: number;
|
|
26
|
+
/** The runner's output, kept for a FAILURE so the row can keep showing it. */
|
|
27
|
+
output?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Everything the bar knows about the run it is showing. */
|
|
30
|
+
export interface TestsRunState {
|
|
31
|
+
runId: string | null;
|
|
32
|
+
running: boolean;
|
|
33
|
+
/** The ids this run covers, in run order. */
|
|
34
|
+
queued: string[];
|
|
35
|
+
/** The id whose output is streaming right now, when the host says which. */
|
|
36
|
+
currentId: string | null;
|
|
37
|
+
/** The live output lines, newest last, capped at {@link MAX_OUTPUT_LINES}. */
|
|
38
|
+
output: string[];
|
|
39
|
+
/** Per-id outcome from this run (and from earlier runs, until re-run). */
|
|
40
|
+
results: Record<string, TestResultEntry>;
|
|
41
|
+
/** How the run ended, once it has. */
|
|
42
|
+
outcome: TestRunOutcome | null;
|
|
43
|
+
/** A run-level failure message (timeout, transport error) shown in the bar. */
|
|
44
|
+
error: string | null;
|
|
45
|
+
startedAt: number | null;
|
|
46
|
+
durationMs: number | null;
|
|
47
|
+
}
|
|
48
|
+
/** Live output lines retained — enough to read, bounded so a chatty run cannot grow forever. */
|
|
49
|
+
export declare const MAX_OUTPUT_LINES = 400;
|
|
50
|
+
/** A run that has not started. */
|
|
51
|
+
export declare const EMPTY_RUN_STATE: TestsRunState;
|
|
52
|
+
/**
|
|
53
|
+
* Group tests for display: by kind (end-to-end first), then by project
|
|
54
|
+
* directory (whatever directories are present — `app`, `my-app/app`,
|
|
55
|
+
* `packages/web`, the root last), with the files sorted inside each group.
|
|
56
|
+
*
|
|
57
|
+
* @param tests - Every discovered test.
|
|
58
|
+
* @returns The groups, in display order. Empty groups are never produced.
|
|
59
|
+
*/
|
|
60
|
+
export declare function groupTests(tests: readonly TestItem[]): TestGroup[];
|
|
61
|
+
/**
|
|
62
|
+
* How many tests there are of each kind.
|
|
63
|
+
*
|
|
64
|
+
* @param tests - Every discovered test.
|
|
65
|
+
* @returns The per-kind counts.
|
|
66
|
+
*/
|
|
67
|
+
export declare function countByKind(tests: readonly TestItem[]): Record<TestKind, number>;
|
|
68
|
+
/**
|
|
69
|
+
* The tallies of the last run, over the tests that are still listed. Counted
|
|
70
|
+
* per FILE (one row, one verdict) so the collapsed summary matches the rows.
|
|
71
|
+
*
|
|
72
|
+
* @param tests - The currently listed tests.
|
|
73
|
+
* @param results - The per-id outcomes.
|
|
74
|
+
* @returns Passed/failed/skipped file counts.
|
|
75
|
+
*/
|
|
76
|
+
export declare function summarizeResults(tests: readonly TestItem[], results: Record<string, TestResultEntry>): {
|
|
77
|
+
passed: number;
|
|
78
|
+
failed: number;
|
|
79
|
+
skipped: number;
|
|
80
|
+
reported: number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Fold one streamed event into the run state.
|
|
84
|
+
*
|
|
85
|
+
* Deliberately total: an event for an id the bar no longer lists is recorded
|
|
86
|
+
* anyway (a re-list may be in flight), and an unknown event type leaves the
|
|
87
|
+
* state untouched rather than throwing inside a stream handler.
|
|
88
|
+
*
|
|
89
|
+
* @param state - The current state.
|
|
90
|
+
* @param event - The event just received.
|
|
91
|
+
* @returns The next state (a new object whenever anything changed).
|
|
92
|
+
*/
|
|
93
|
+
export declare function applyTestRunEvent(state: TestsRunState, event: TestRunEvent): TestsRunState;
|
|
94
|
+
/**
|
|
95
|
+
* The state after a run that never produced a `done` event — the host's stream
|
|
96
|
+
* died, or its request failed before the server could answer.
|
|
97
|
+
*
|
|
98
|
+
* @param state - The current state.
|
|
99
|
+
* @param message - What to show in the bar.
|
|
100
|
+
* @returns The next state, no longer running.
|
|
101
|
+
*/
|
|
102
|
+
export declare function failRun(state: TestsRunState, message: string): TestsRunState;
|
|
103
|
+
/**
|
|
104
|
+
* Whether a row should render as "running": the run is live and either the host
|
|
105
|
+
* named this row as current, or it is in the queue and has no verdict yet.
|
|
106
|
+
*
|
|
107
|
+
* @param state - The run state.
|
|
108
|
+
* @param id - The row's test id.
|
|
109
|
+
* @returns True when the row is part of the live run and still undecided.
|
|
110
|
+
*/
|
|
111
|
+
export declare function isRowRunning(state: TestsRunState, id: string): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* The label for a row: the host's title when it gave one, else the file path.
|
|
114
|
+
*
|
|
115
|
+
* @param item - The test.
|
|
116
|
+
* @returns The label to render.
|
|
117
|
+
*/
|
|
118
|
+
export declare function testRowLabel(item: TestItem): string;
|
|
119
|
+
/**
|
|
120
|
+
* Whether a written path is a test file, so the bar can re-list the moment the
|
|
121
|
+
* agent writes a NEW spec instead of only on the next run or reload. Matches
|
|
122
|
+
* the same `*.spec.*` / `*.test.*` shape the host's discovery looks for, so a
|
|
123
|
+
* write that cannot change the list never costs a listing.
|
|
124
|
+
*
|
|
125
|
+
* @param path - The path that changed (absolute or workspace-relative).
|
|
126
|
+
* @returns True when the path is a spec or test file.
|
|
127
|
+
*/
|
|
128
|
+
export declare function isTestFilePath(path: string): boolean;
|
|
129
|
+
//# sourceMappingURL=tests-bar-utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests-bar-utilities.d.ts","sourceRoot":"","sources":["../../src/components/tests-bar-utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,UAAU,EACV,a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EAAE,CAelE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAKhF;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACvC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAYvE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,GAAG,aAAa,CA0D1F;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,CAE5E;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAItE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure state + grouping helpers for the {@link TestsBar}.
|
|
3
|
+
*
|
|
4
|
+
* Everything here is a plain function over plain data, so the bar's behaviour
|
|
5
|
+
* (which rows a group runs, how a streamed event moves the run forward, what
|
|
6
|
+
* the collapsed summary says) is unit-testable without rendering anything.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/** Live output lines retained — enough to read, bounded so a chatty run cannot grow forever. */
|
|
11
|
+
export const MAX_OUTPUT_LINES = 400;
|
|
12
|
+
/** Display order of the kinds: the preview-driven specs lead, unit tests follow. */
|
|
13
|
+
const KIND_ORDER = ['e2e', 'unit'];
|
|
14
|
+
/**
|
|
15
|
+
* Display order of the project directories within a kind: by path, with the
|
|
16
|
+
* workspace root (`.`) last — it is the least specific place a test can live.
|
|
17
|
+
*
|
|
18
|
+
* @param a - One directory.
|
|
19
|
+
* @param b - The other.
|
|
20
|
+
* @returns The sort order.
|
|
21
|
+
*/
|
|
22
|
+
function compareWorkspaces(a, b) {
|
|
23
|
+
if (a === b)
|
|
24
|
+
return 0;
|
|
25
|
+
if (a === '.')
|
|
26
|
+
return 1;
|
|
27
|
+
if (b === '.')
|
|
28
|
+
return -1;
|
|
29
|
+
return a.localeCompare(b);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The heading name for a directory: the host's label when it sent one, else
|
|
33
|
+
* the path itself, and `null` for the root either way.
|
|
34
|
+
*
|
|
35
|
+
* @param item - Any test in the group.
|
|
36
|
+
* @returns The label, or `null` for the workspace root.
|
|
37
|
+
*/
|
|
38
|
+
function labelFor(item) {
|
|
39
|
+
if (item.workspaceLabel !== undefined)
|
|
40
|
+
return item.workspaceLabel;
|
|
41
|
+
return item.workspace === '.' ? null : item.workspace;
|
|
42
|
+
}
|
|
43
|
+
/** A run that has not started. */
|
|
44
|
+
export const EMPTY_RUN_STATE = {
|
|
45
|
+
runId: null,
|
|
46
|
+
running: false,
|
|
47
|
+
queued: [],
|
|
48
|
+
currentId: null,
|
|
49
|
+
output: [],
|
|
50
|
+
results: {},
|
|
51
|
+
outcome: null,
|
|
52
|
+
error: null,
|
|
53
|
+
startedAt: null,
|
|
54
|
+
durationMs: null,
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Group tests for display: by kind (end-to-end first), then by project
|
|
58
|
+
* directory (whatever directories are present — `app`, `my-app/app`,
|
|
59
|
+
* `packages/web`, the root last), with the files sorted inside each group.
|
|
60
|
+
*
|
|
61
|
+
* @param tests - Every discovered test.
|
|
62
|
+
* @returns The groups, in display order. Empty groups are never produced.
|
|
63
|
+
*/
|
|
64
|
+
export function groupTests(tests) {
|
|
65
|
+
const groups = [];
|
|
66
|
+
for (const kind of KIND_ORDER) {
|
|
67
|
+
const workspaces = [
|
|
68
|
+
...new Set(tests.filter((t) => t.kind === kind).map((t) => t.workspace)),
|
|
69
|
+
].sort(compareWorkspaces);
|
|
70
|
+
for (const workspace of workspaces) {
|
|
71
|
+
const items = tests
|
|
72
|
+
.filter((t) => t.kind === kind && t.workspace === workspace)
|
|
73
|
+
.slice()
|
|
74
|
+
.sort((a, b) => a.file.localeCompare(b.file));
|
|
75
|
+
if (items.length > 0)
|
|
76
|
+
groups.push({ kind, workspace, label: labelFor(items[0]), items });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return groups;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* How many tests there are of each kind.
|
|
83
|
+
*
|
|
84
|
+
* @param tests - Every discovered test.
|
|
85
|
+
* @returns The per-kind counts.
|
|
86
|
+
*/
|
|
87
|
+
export function countByKind(tests) {
|
|
88
|
+
return {
|
|
89
|
+
e2e: tests.filter((t) => t.kind === 'e2e').length,
|
|
90
|
+
unit: tests.filter((t) => t.kind === 'unit').length,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The tallies of the last run, over the tests that are still listed. Counted
|
|
95
|
+
* per FILE (one row, one verdict) so the collapsed summary matches the rows.
|
|
96
|
+
*
|
|
97
|
+
* @param tests - The currently listed tests.
|
|
98
|
+
* @param results - The per-id outcomes.
|
|
99
|
+
* @returns Passed/failed/skipped file counts.
|
|
100
|
+
*/
|
|
101
|
+
export function summarizeResults(tests, results) {
|
|
102
|
+
let passed = 0;
|
|
103
|
+
let failed = 0;
|
|
104
|
+
let skipped = 0;
|
|
105
|
+
for (const test of tests) {
|
|
106
|
+
const entry = results[test.id];
|
|
107
|
+
if (!entry)
|
|
108
|
+
continue;
|
|
109
|
+
if (entry.status === 'passed')
|
|
110
|
+
passed += 1;
|
|
111
|
+
else if (entry.status === 'failed')
|
|
112
|
+
failed += 1;
|
|
113
|
+
else
|
|
114
|
+
skipped += 1;
|
|
115
|
+
}
|
|
116
|
+
return { passed, failed, skipped, reported: passed + failed + skipped };
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Fold one streamed event into the run state.
|
|
120
|
+
*
|
|
121
|
+
* Deliberately total: an event for an id the bar no longer lists is recorded
|
|
122
|
+
* anyway (a re-list may be in flight), and an unknown event type leaves the
|
|
123
|
+
* state untouched rather than throwing inside a stream handler.
|
|
124
|
+
*
|
|
125
|
+
* @param state - The current state.
|
|
126
|
+
* @param event - The event just received.
|
|
127
|
+
* @returns The next state (a new object whenever anything changed).
|
|
128
|
+
*/
|
|
129
|
+
export function applyTestRunEvent(state, event) {
|
|
130
|
+
switch (event.type) {
|
|
131
|
+
case 'start': {
|
|
132
|
+
// A new run clears the previous run's verdicts for the ids it covers, so
|
|
133
|
+
// a stale green pill never sits next to a row that is running again.
|
|
134
|
+
const results = { ...state.results };
|
|
135
|
+
for (const id of event.ids)
|
|
136
|
+
delete results[id];
|
|
137
|
+
return {
|
|
138
|
+
...state,
|
|
139
|
+
runId: event.runId,
|
|
140
|
+
running: true,
|
|
141
|
+
queued: [...event.ids],
|
|
142
|
+
currentId: null,
|
|
143
|
+
output: [],
|
|
144
|
+
results,
|
|
145
|
+
outcome: null,
|
|
146
|
+
error: null,
|
|
147
|
+
startedAt: Date.now(),
|
|
148
|
+
durationMs: null,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
case 'output': {
|
|
152
|
+
const output = [...state.output, ...event.chunk.split('\n')];
|
|
153
|
+
return {
|
|
154
|
+
...state,
|
|
155
|
+
currentId: event.id ?? state.currentId,
|
|
156
|
+
output: output.length > MAX_OUTPUT_LINES ? output.slice(-MAX_OUTPUT_LINES) : output,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
case 'result': {
|
|
160
|
+
return {
|
|
161
|
+
...state,
|
|
162
|
+
results: {
|
|
163
|
+
...state.results,
|
|
164
|
+
[event.id]: {
|
|
165
|
+
status: event.status,
|
|
166
|
+
...(event.durationMs != null ? { durationMs: event.durationMs } : {}),
|
|
167
|
+
passed: event.passed ?? 0,
|
|
168
|
+
failed: event.failed ?? 0,
|
|
169
|
+
skipped: event.skipped ?? 0,
|
|
170
|
+
...(event.output ? { output: event.output } : {}),
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
case 'done': {
|
|
176
|
+
return {
|
|
177
|
+
...state,
|
|
178
|
+
running: false,
|
|
179
|
+
currentId: null,
|
|
180
|
+
outcome: event.outcome,
|
|
181
|
+
error: event.error ?? null,
|
|
182
|
+
durationMs: event.durationMs ?? (state.startedAt ? Date.now() - state.startedAt : null),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
default:
|
|
186
|
+
return state;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* The state after a run that never produced a `done` event — the host's stream
|
|
191
|
+
* died, or its request failed before the server could answer.
|
|
192
|
+
*
|
|
193
|
+
* @param state - The current state.
|
|
194
|
+
* @param message - What to show in the bar.
|
|
195
|
+
* @returns The next state, no longer running.
|
|
196
|
+
*/
|
|
197
|
+
export function failRun(state, message) {
|
|
198
|
+
return { ...state, running: false, currentId: null, outcome: 'error', error: message };
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Whether a row should render as "running": the run is live and either the host
|
|
202
|
+
* named this row as current, or it is in the queue and has no verdict yet.
|
|
203
|
+
*
|
|
204
|
+
* @param state - The run state.
|
|
205
|
+
* @param id - The row's test id.
|
|
206
|
+
* @returns True when the row is part of the live run and still undecided.
|
|
207
|
+
*/
|
|
208
|
+
export function isRowRunning(state, id) {
|
|
209
|
+
if (!state.running)
|
|
210
|
+
return false;
|
|
211
|
+
if (state.currentId === id)
|
|
212
|
+
return true;
|
|
213
|
+
return state.queued.includes(id) && state.results[id] == null;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* The label for a row: the host's title when it gave one, else the file path.
|
|
217
|
+
*
|
|
218
|
+
* @param item - The test.
|
|
219
|
+
* @returns The label to render.
|
|
220
|
+
*/
|
|
221
|
+
export function testRowLabel(item) {
|
|
222
|
+
return item.title?.trim() || item.file;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Whether a written path is a test file, so the bar can re-list the moment the
|
|
226
|
+
* agent writes a NEW spec instead of only on the next run or reload. Matches
|
|
227
|
+
* the same `*.spec.*` / `*.test.*` shape the host's discovery looks for, so a
|
|
228
|
+
* write that cannot change the list never costs a listing.
|
|
229
|
+
*
|
|
230
|
+
* @param path - The path that changed (absolute or workspace-relative).
|
|
231
|
+
* @returns True when the path is a spec or test file.
|
|
232
|
+
*/
|
|
233
|
+
export function isTestFilePath(path) {
|
|
234
|
+
return /\.(spec|test)\.[cm]?[jt]sx?$/.test(path);
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=tests-bar-utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests-bar-utilities.js","sourceRoot":"","sources":["../../src/components/tests-bar-utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmDH,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;AAEnC,oFAAoF;AACpF,MAAM,UAAU,GAAwB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;AAEvD;;;;;;;GAOG;AACH,SAAS,iBAAiB,CAAC,CAAgB,EAAE,CAAgB;IAC3D,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAA;IACrB,IAAI,CAAC,KAAK,GAAG;QAAE,OAAO,CAAC,CAAA;IACvB,IAAI,CAAC,KAAK,GAAG;QAAE,OAAO,CAAC,CAAC,CA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