@sentinelqa/playwright-reporter 0.1.15 → 0.1.16
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/dist/localReport.js +3 -75
- package/package.json +1 -1
package/dist/localReport.js
CHANGED
|
@@ -254,22 +254,9 @@ const renderArtifact = (artifact) => {
|
|
|
254
254
|
const label = escapeHtml(artifact.label);
|
|
255
255
|
if (artifact.kind === "trace") {
|
|
256
256
|
return `
|
|
257
|
-
<div class="artifact-link
|
|
258
|
-
<
|
|
259
|
-
|
|
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>
|
|
257
|
+
<div class="artifact-link">
|
|
258
|
+
<span class="artifact-kind">Trace</span>
|
|
259
|
+
<a href="${href}" target="_blank" rel="noreferrer">${label}</a>
|
|
273
260
|
</div>
|
|
274
261
|
`;
|
|
275
262
|
}
|
|
@@ -556,9 +543,6 @@ const buildHtml = (tests, summary, extraArtifacts) => {
|
|
|
556
543
|
background: rgba(9, 13, 20, 0.9);
|
|
557
544
|
padding: 12px;
|
|
558
545
|
}
|
|
559
|
-
.artifact-link-trace {
|
|
560
|
-
padding: 14px;
|
|
561
|
-
}
|
|
562
546
|
.artifact-card img, .artifact-card video {
|
|
563
547
|
width: 100%;
|
|
564
548
|
border-radius: 10px;
|
|
@@ -583,37 +567,6 @@ const buildHtml = (tests, summary, extraArtifacts) => {
|
|
|
583
567
|
text-transform: uppercase;
|
|
584
568
|
letter-spacing: 0.08em;
|
|
585
569
|
}
|
|
586
|
-
.artifact-trace-row {
|
|
587
|
-
display: flex;
|
|
588
|
-
justify-content: space-between;
|
|
589
|
-
gap: 12px;
|
|
590
|
-
align-items: center;
|
|
591
|
-
}
|
|
592
|
-
.artifact-trace-meta {
|
|
593
|
-
display: flex;
|
|
594
|
-
gap: 10px;
|
|
595
|
-
align-items: center;
|
|
596
|
-
flex-wrap: wrap;
|
|
597
|
-
}
|
|
598
|
-
.trace-button {
|
|
599
|
-
display: inline-flex;
|
|
600
|
-
align-items: center;
|
|
601
|
-
justify-content: center;
|
|
602
|
-
padding: 8px 12px;
|
|
603
|
-
border-radius: 999px;
|
|
604
|
-
border: 1px solid rgba(125, 211, 252, 0.28);
|
|
605
|
-
background: rgba(125, 211, 252, 0.08);
|
|
606
|
-
color: var(--accent);
|
|
607
|
-
font-size: 12px;
|
|
608
|
-
font-weight: 600;
|
|
609
|
-
text-transform: uppercase;
|
|
610
|
-
letter-spacing: 0.06em;
|
|
611
|
-
white-space: nowrap;
|
|
612
|
-
}
|
|
613
|
-
.trace-button:hover {
|
|
614
|
-
text-decoration: none;
|
|
615
|
-
background: rgba(125, 211, 252, 0.14);
|
|
616
|
-
}
|
|
617
570
|
.artifact-list {
|
|
618
571
|
display: grid;
|
|
619
572
|
gap: 12px;
|
|
@@ -654,10 +607,6 @@ const buildHtml = (tests, summary, extraArtifacts) => {
|
|
|
654
607
|
}
|
|
655
608
|
.test-summary { flex-direction: column; }
|
|
656
609
|
.meta-stack { min-width: 0; }
|
|
657
|
-
.artifact-trace-row {
|
|
658
|
-
flex-direction: column;
|
|
659
|
-
align-items: flex-start;
|
|
660
|
-
}
|
|
661
610
|
}
|
|
662
611
|
</style>
|
|
663
612
|
</head>
|
|
@@ -726,27 +675,6 @@ const buildHtml = (tests, summary, extraArtifacts) => {
|
|
|
726
675
|
Generated by <a href="${SENTINEL_URL}" target="_blank" rel="noreferrer">Sentinel Playwright Reporter</a>.
|
|
727
676
|
</footer>
|
|
728
677
|
</div>
|
|
729
|
-
<script>
|
|
730
|
-
(function () {
|
|
731
|
-
var traceButtons = document.querySelectorAll("[data-trace-path]");
|
|
732
|
-
traceButtons.forEach(function (button) {
|
|
733
|
-
var tracePath = button.getAttribute("data-trace-path");
|
|
734
|
-
if (!tracePath) return;
|
|
735
|
-
|
|
736
|
-
try {
|
|
737
|
-
if (window.location.protocol === "http:" || window.location.protocol === "https:") {
|
|
738
|
-
var traceUrl = new URL(tracePath, window.location.href).href;
|
|
739
|
-
button.setAttribute(
|
|
740
|
-
"href",
|
|
741
|
-
"https://trace.playwright.dev/?trace=" + encodeURIComponent(traceUrl)
|
|
742
|
-
);
|
|
743
|
-
}
|
|
744
|
-
} catch (_error) {
|
|
745
|
-
// Fall back to the raw trace zip link when URL construction fails.
|
|
746
|
-
}
|
|
747
|
-
});
|
|
748
|
-
})();
|
|
749
|
-
</script>
|
|
750
678
|
</body>
|
|
751
679
|
</html>`;
|
|
752
680
|
};
|