@sentinelqa/playwright-reporter 0.1.13 → 0.1.14

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.
@@ -252,6 +252,27 @@ const summarizeTests = (tests) => {
252
252
  const renderArtifact = (artifact) => {
253
253
  const href = escapeHtml(artifact.relativePath);
254
254
  const label = escapeHtml(artifact.label);
255
+ if (artifact.kind === "trace") {
256
+ return `
257
+ <div class="artifact-link artifact-link-trace">
258
+ <div class="artifact-trace-row">
259
+ <div class="artifact-trace-meta">
260
+ <span class="artifact-kind">Trace</span>
261
+ <a href="${href}" target="_blank" rel="noreferrer">${label}</a>
262
+ </div>
263
+ <a
264
+ class="trace-button"
265
+ href="${href}"
266
+ target="_blank"
267
+ rel="noreferrer"
268
+ data-trace-path="${href}"
269
+ >
270
+ View Trace
271
+ </a>
272
+ </div>
273
+ </div>
274
+ `;
275
+ }
255
276
  if (artifact.kind === "screenshot") {
256
277
  return `
257
278
  <div class="artifact-card">
@@ -514,6 +535,9 @@ const buildHtml = (tests, summary, extraArtifacts) => {
514
535
  background: rgba(9, 13, 20, 0.9);
515
536
  padding: 12px;
516
537
  }
538
+ .artifact-link-trace {
539
+ padding: 14px;
540
+ }
517
541
  .artifact-card img, .artifact-card video {
518
542
  width: 100%;
519
543
  border-radius: 10px;
@@ -538,6 +562,37 @@ const buildHtml = (tests, summary, extraArtifacts) => {
538
562
  text-transform: uppercase;
539
563
  letter-spacing: 0.08em;
540
564
  }
565
+ .artifact-trace-row {
566
+ display: flex;
567
+ justify-content: space-between;
568
+ gap: 12px;
569
+ align-items: center;
570
+ }
571
+ .artifact-trace-meta {
572
+ display: flex;
573
+ gap: 10px;
574
+ align-items: center;
575
+ flex-wrap: wrap;
576
+ }
577
+ .trace-button {
578
+ display: inline-flex;
579
+ align-items: center;
580
+ justify-content: center;
581
+ padding: 8px 12px;
582
+ border-radius: 999px;
583
+ border: 1px solid rgba(125, 211, 252, 0.28);
584
+ background: rgba(125, 211, 252, 0.08);
585
+ color: var(--accent);
586
+ font-size: 12px;
587
+ font-weight: 600;
588
+ text-transform: uppercase;
589
+ letter-spacing: 0.06em;
590
+ white-space: nowrap;
591
+ }
592
+ .trace-button:hover {
593
+ text-decoration: none;
594
+ background: rgba(125, 211, 252, 0.14);
595
+ }
541
596
  .artifact-list {
542
597
  display: grid;
543
598
  gap: 12px;
@@ -571,6 +626,10 @@ const buildHtml = (tests, summary, extraArtifacts) => {
571
626
  }
572
627
  .test-summary { flex-direction: column; }
573
628
  .meta-stack { min-width: 0; }
629
+ .artifact-trace-row {
630
+ flex-direction: column;
631
+ align-items: flex-start;
632
+ }
574
633
  }
575
634
  </style>
576
635
  </head>
@@ -622,14 +681,16 @@ const buildHtml = (tests, summary, extraArtifacts) => {
622
681
 
623
682
  <section class="section-shell">
624
683
  <h2>Optional: Sentinel Cloud</h2>
625
- <div class="artifact-list">
626
- <div class="artifact-link">Upload runs to Sentinel Cloud for:</div>
627
- <div class="artifact-link">• CI history</div>
628
- <div class="artifact-link">• shareable run links</div>
629
- <div class="artifact-link">• AI failure summaries</div>
630
- <div class="artifact-link">
684
+ <div class="panel">
685
+ <p>Upload runs to Sentinel Cloud for:</p>
686
+ <ul>
687
+ <li>CI history</li>
688
+ <li>shareable run links</li>
689
+ <li>AI failure summaries</li>
690
+ </ul>
691
+ <p>
631
692
  <a href="${SENTINEL_URL}" target="_blank" rel="noreferrer">More on sentinelqa.com</a>
632
- </div>
693
+ </p>
633
694
  </div>
634
695
  </section>
635
696
 
@@ -637,6 +698,27 @@ const buildHtml = (tests, summary, extraArtifacts) => {
637
698
  Generated by <a href="${SENTINEL_URL}" target="_blank" rel="noreferrer">Sentinel Playwright Reporter</a>.
638
699
  </footer>
639
700
  </div>
701
+ <script>
702
+ (function () {
703
+ var traceButtons = document.querySelectorAll("[data-trace-path]");
704
+ traceButtons.forEach(function (button) {
705
+ var tracePath = button.getAttribute("data-trace-path");
706
+ if (!tracePath) return;
707
+
708
+ try {
709
+ if (window.location.protocol === "http:" || window.location.protocol === "https:") {
710
+ var traceUrl = new URL(tracePath, window.location.href).href;
711
+ button.setAttribute(
712
+ "href",
713
+ "https://trace.playwright.dev/?trace=" + encodeURIComponent(traceUrl)
714
+ );
715
+ }
716
+ } catch (_error) {
717
+ // Fall back to the raw trace zip link when URL construction fails.
718
+ }
719
+ });
720
+ })();
721
+ </script>
640
722
  </body>
641
723
  </html>`;
642
724
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentinelqa/playwright-reporter",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "private": false,
5
5
  "description": "Playwright reporter for CI debugging with optional Sentinel cloud dashboards",
6
6
  "license": "MIT",