plum-e2e 2.4.6 → 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.
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "Report" ADD COLUMN "testRunId" TEXT;
3
+
4
+ -- AddForeignKey
5
+ ALTER TABLE "Report" ADD CONSTRAINT "Report_testRunId_fkey" FOREIGN KEY ("testRunId") REFERENCES "TestRun"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -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
  });
@@ -332,8 +332,8 @@
332
332
  <span class="status-dot" class:pulse={state.running} style="background:{statusColor}"
333
333
  ></span>
334
334
  <span class="status-word" style="color:{statusColor}">{statusLabel}</span>
335
- {#if state.lastRunId}
336
- <span class="run-tag">{state.lastRunId || 'all tests'}</span>
335
+ {#if state.lastRunId || state.currentRun?.runTitle}
336
+ <span class="run-tag">{state.currentRun?.runTitle || state.lastRunId}</span>
337
337
  {/if}
338
338
  </div>
339
339
  {#if state.testCompleted && state.latestReportId}
@@ -228,9 +228,10 @@
228
228
  {report.status === 'PASS' ? '✓' : '✗'}
229
229
  </span>
230
230
  <div class="item-meta">
231
- <span class="item-tags"
232
- >{isScheduled(report.triggerType) ? report.triggerType : report.tags}</span
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)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plum-e2e",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/silverlunah/plum.git"