plum-e2e 2.4.5 → 2.4.7
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/backend/prisma/migrations/20260622000000_report_test_run/migration.sql +5 -0
- package/backend/prisma/schema.prisma +3 -0
- package/backend/services/reportService.js +5 -2
- package/frontend/src/lib/components/layout/RunnerPanel.svelte +12 -5
- package/frontend/src/lib/stores/runner.js +2 -2
- package/frontend/src/routes/reports/+page.svelte +7 -3
- package/frontend/src/routes/test-repository/runs/[id]/+page.svelte +3 -0
- package/package.json +1 -1
|
@@ -64,6 +64,8 @@ model Report {
|
|
|
64
64
|
runner Runner? @relation(fields: [runnerId], references: [id], onDelete: SetNull)
|
|
65
65
|
cronJobId Int?
|
|
66
66
|
cronJob CronJob? @relation(fields: [cronJobId], references: [id], onDelete: SetNull)
|
|
67
|
+
testRunId String?
|
|
68
|
+
testRun TestRun? @relation(fields: [testRunId], references: [id], onDelete: SetNull)
|
|
67
69
|
content Json
|
|
68
70
|
createdAt DateTime @default(now())
|
|
69
71
|
testHistory TestCaseHistory[]
|
|
@@ -162,6 +164,7 @@ model TestRun {
|
|
|
162
164
|
updatedAt DateTime @updatedAt
|
|
163
165
|
entries TestRunEntry[]
|
|
164
166
|
history TestCaseHistory[]
|
|
167
|
+
reports Report[]
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
model TestRunEntry {
|
|
@@ -239,7 +239,8 @@ const getAllReports = () =>
|
|
|
239
239
|
runners: true,
|
|
240
240
|
browser: true,
|
|
241
241
|
runnerName: true,
|
|
242
|
-
createdAt: true
|
|
242
|
+
createdAt: true,
|
|
243
|
+
testRun: { select: { id: true, title: true } }
|
|
243
244
|
}
|
|
244
245
|
});
|
|
245
246
|
|
|
@@ -263,7 +264,8 @@ const getReportDetail = async (id) => {
|
|
|
263
264
|
browser: true,
|
|
264
265
|
runnerName: true,
|
|
265
266
|
createdAt: true,
|
|
266
|
-
content: true
|
|
267
|
+
content: true,
|
|
268
|
+
testRun: { select: { id: true, title: true } }
|
|
267
269
|
}
|
|
268
270
|
});
|
|
269
271
|
if (!report) return null;
|
|
@@ -315,6 +317,7 @@ const saveReport = async ({
|
|
|
315
317
|
runnerName: runnerName ?? null,
|
|
316
318
|
runnerId: runnerId ?? null,
|
|
317
319
|
cronJobId,
|
|
320
|
+
testRunId: testRunId ?? null,
|
|
318
321
|
content: { features }
|
|
319
322
|
}
|
|
320
323
|
});
|
|
@@ -198,6 +198,13 @@
|
|
|
198
198
|
|
|
199
199
|
$: state = $runnerState;
|
|
200
200
|
$: cfg = $runnerConfig;
|
|
201
|
+
|
|
202
|
+
$: truncatedRunTag = (() => {
|
|
203
|
+
if (!state.currentRun?.tag) return 'all tests';
|
|
204
|
+
const parts = state.currentRun.tag.split(/ or /i);
|
|
205
|
+
if (parts.length <= 5) return state.currentRun.tag;
|
|
206
|
+
return parts.slice(0, 5).join(' or ') + ` +${parts.length - 5} more`;
|
|
207
|
+
})();
|
|
201
208
|
$: cronJobs = Object.keys($activeCronJobs);
|
|
202
209
|
$: anyCronRunning = cronJobs.length > 0;
|
|
203
210
|
$: anyRunning = state.running || anyCronRunning;
|
|
@@ -263,7 +270,7 @@
|
|
|
263
270
|
if (selectedRun) {
|
|
264
271
|
if (selectedRunLoading || !selectedRun.tags) return;
|
|
265
272
|
if (selectedRun.tags.length === 0) return;
|
|
266
|
-
triggerRun(selectedRun.tags.join(' or '), selectedRun.id, notify);
|
|
273
|
+
triggerRun(selectedRun.tags.join(' or '), selectedRun.id, notify, selectedRun.title);
|
|
267
274
|
} else if ($runnerConfig.testID.trim() === '') {
|
|
268
275
|
runAllModalOpen = true;
|
|
269
276
|
} else {
|
|
@@ -325,8 +332,8 @@
|
|
|
325
332
|
<span class="status-dot" class:pulse={state.running} style="background:{statusColor}"
|
|
326
333
|
></span>
|
|
327
334
|
<span class="status-word" style="color:{statusColor}">{statusLabel}</span>
|
|
328
|
-
{#if state.lastRunId}
|
|
329
|
-
<span class="run-tag">{state.
|
|
335
|
+
{#if state.lastRunId || state.currentRun?.runTitle}
|
|
336
|
+
<span class="run-tag">{state.currentRun?.runTitle || state.lastRunId}</span>
|
|
330
337
|
{/if}
|
|
331
338
|
</div>
|
|
332
339
|
{#if state.testCompleted && state.latestReportId}
|
|
@@ -682,10 +689,10 @@
|
|
|
682
689
|
<a href="/reports/live" class="run-card active-run">
|
|
683
690
|
<span class="run-card-dot pulse-accent"></span>
|
|
684
691
|
<div class="run-card-info">
|
|
685
|
-
<span class="run-card-label">Manual run</span>
|
|
692
|
+
<span class="run-card-label">{state.currentRun?.runTitle || 'Manual run'}</span>
|
|
686
693
|
{#if state.currentRun}
|
|
687
694
|
<span class="run-card-meta">
|
|
688
|
-
{
|
|
695
|
+
{truncatedRunTag}
|
|
689
696
|
<span class="meta-dot">·</span>
|
|
690
697
|
{state.currentRun.workers}w
|
|
691
698
|
<span class="meta-dot">·</span>
|
|
@@ -48,7 +48,7 @@ export const runsVersion = writable(0);
|
|
|
48
48
|
// Map of taskName → true for every cron job currently executing
|
|
49
49
|
export const activeCronJobs = writable({});
|
|
50
50
|
|
|
51
|
-
export function triggerRun(id, testRunId, notify = {}) {
|
|
51
|
+
export function triggerRun(id, testRunId, notify = {}, runTitle = null) {
|
|
52
52
|
const s = get(socket);
|
|
53
53
|
if (!s) return;
|
|
54
54
|
|
|
@@ -63,7 +63,7 @@ export function triggerRun(id, testRunId, notify = {}) {
|
|
|
63
63
|
status: 'running',
|
|
64
64
|
lastRunId: runId,
|
|
65
65
|
lanes: [],
|
|
66
|
-
currentRun: { tag: runId, workers, browser, runners: selectedRunners }
|
|
66
|
+
currentRun: { tag: runId, workers, browser, runners: selectedRunners, runTitle }
|
|
67
67
|
});
|
|
68
68
|
panelExpanded.set(true);
|
|
69
69
|
|
|
@@ -228,9 +228,10 @@
|
|
|
228
228
|
{report.status === 'PASS' ? '✓' : '✗'}
|
|
229
229
|
</span>
|
|
230
230
|
<div class="item-meta">
|
|
231
|
-
<span class="item-tags"
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
<span class="item-tags">
|
|
232
|
+
{report.testRun?.title ??
|
|
233
|
+
(isScheduled(report.triggerType) ? report.triggerType : report.tags)}
|
|
234
|
+
</span>
|
|
234
235
|
<div class="item-badges">
|
|
235
236
|
<Badge variant={triggerVariant(report.triggerType)}>
|
|
236
237
|
{triggerLabel(report.triggerType)}
|
|
@@ -571,6 +572,9 @@
|
|
|
571
572
|
font-size: 0.8rem;
|
|
572
573
|
color: var(--text);
|
|
573
574
|
white-space: nowrap;
|
|
575
|
+
overflow: hidden;
|
|
576
|
+
text-overflow: ellipsis;
|
|
577
|
+
min-width: 0;
|
|
574
578
|
}
|
|
575
579
|
|
|
576
580
|
.item-badges {
|