@arghajit/dummy 0.1.2-beta-2 → 0.1.2-beta-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -343,7 +343,7 @@ class PlaywrightPulseReporter {
343
343
  }
344
344
  const finalResults = [];
345
345
  for (const [baseId, runs] of groupedResults.entries()) {
346
- // Sort runs to find the best status and overall duration
346
+ // Sort runs to find the best status
347
347
  runs.sort((a, b) => this._getStatusOrder(a.status) - this._getStatusOrder(b.status));
348
348
  const bestRun = runs[0];
349
349
  // Calculate total duration from the earliest start to the latest end time of all runs
@@ -468,7 +468,11 @@ class PlaywrightPulseReporter {
468
468
  await this._writeShardResults();
469
469
  return;
470
470
  }
471
- const finalResults = this._getFinalizedResults(this.results);
471
+ let finalReport;
472
+ // `this.results` contains all individual run attempts. We will keep them all.
473
+ const allAttempts = this.results;
474
+ // Use your existing logic ONLY to get the final statuses for the summary counts.
475
+ const summaryResults = this._getFinalizedResults(this.results);
472
476
  const runEndTime = Date.now();
473
477
  const duration = runEndTime - this.runStartTime;
474
478
  const runId = this.currentRunId;
@@ -476,22 +480,27 @@ class PlaywrightPulseReporter {
476
480
  const runData = {
477
481
  id: runId,
478
482
  timestamp: new Date(this.runStartTime),
479
- totalTests: finalResults.length,
480
- passed: finalResults.filter((r) => r.status === "passed").length,
481
- failed: finalResults.filter((r) => r.status === "failed").length,
482
- skipped: finalResults.filter((r) => r.status === "skipped").length,
483
- flaky: finalResults.filter((r) => r.status === "flaky").length,
483
+ totalTests: summaryResults.length,
484
+ passed: summaryResults.filter((r) => r.status === "passed").length,
485
+ failed: summaryResults.filter((r) => r.status === "failed").length,
486
+ skipped: summaryResults.filter((r) => r.status === "skipped").length,
487
+ flaky: summaryResults.filter((r) => r.status === "flaky").length,
484
488
  duration,
485
489
  environment: environmentDetails,
486
490
  };
487
- let finalReport = undefined;
491
+ // In the final report object, use the complete list of attempts.
492
+ finalReport = {
493
+ run: runData,
494
+ results: allAttempts, // <<< USE THE FULL LIST HERE
495
+ metadata: { generatedAt: new Date().toISOString() },
496
+ };
488
497
  if (this.isSharded) {
489
498
  finalReport = await this._mergeShardResults(runData);
490
499
  }
491
500
  else {
492
501
  finalReport = {
493
502
  run: runData,
494
- results: finalResults, // Cast to any to bypass the type mismatch
503
+ results: summaryResults, // Cast to any to bypass the type mismatch
495
504
  metadata: { generatedAt: new Date().toISOString() },
496
505
  };
497
506
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arghajit/dummy",
3
- "version": "0.1.2-beta-2",
3
+ "version": "0.1.2-beta-4",
4
4
  "description": "A Playwright reporter and dashboard for visualizing test results.",
5
5
  "homepage": "https://playwright-pulse-report.netlify.app/",
6
6
  "keywords": [