ortoni-report 3.0.4 → 3.0.5
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/changelog.md +7 -0
- package/dist/ortoni-report.js +33 -2
- package/dist/ortoni-report.mjs +33 -2
- package/dist/views/head.hbs +1 -1
- package/dist/views/main.hbs +12 -2
- package/package.json +1 -1
package/changelog.md
CHANGED
package/dist/ortoni-report.js
CHANGED
|
@@ -215,7 +215,7 @@ function formatDateLocal(isoString) {
|
|
|
215
215
|
hour: "2-digit",
|
|
216
216
|
minute: "2-digit",
|
|
217
217
|
hour12: true,
|
|
218
|
-
timeZoneName: "
|
|
218
|
+
timeZoneName: "shortOffset"
|
|
219
219
|
};
|
|
220
220
|
return new Intl.DateTimeFormat(void 0, options).format(date);
|
|
221
221
|
}
|
|
@@ -1563,9 +1563,39 @@ function convertMarkdownToHtml(markdownPath, htmlOutputPath, stepsError, resultE
|
|
|
1563
1563
|
code, pre { background: #f4f4f4; padding: 0.5rem; border-radius: 5px; display: block; overflow-x: auto; }
|
|
1564
1564
|
h1, h2, h3 { color: #444; }
|
|
1565
1565
|
hr { margin: 2em 0; }
|
|
1566
|
+
#copyBtn {
|
|
1567
|
+
background-color: #007acc;
|
|
1568
|
+
color: white;
|
|
1569
|
+
border: none;
|
|
1570
|
+
padding: 0.5rem 1rem;
|
|
1571
|
+
margin-bottom: 1rem;
|
|
1572
|
+
border-radius: 5px;
|
|
1573
|
+
cursor: pointer;
|
|
1574
|
+
}
|
|
1575
|
+
#copyBtn:hover {
|
|
1576
|
+
background-color: #005fa3;
|
|
1577
|
+
}
|
|
1566
1578
|
</style>
|
|
1567
1579
|
</head>
|
|
1568
1580
|
<body>
|
|
1581
|
+
<button id="copyBtn">\u{1F4CB} Copy All</button>
|
|
1582
|
+
<script>
|
|
1583
|
+
document.getElementById("copyBtn").addEventListener("click", () => {
|
|
1584
|
+
const content = document.getElementById("markdownContent").innerText;
|
|
1585
|
+
navigator.clipboard.writeText(content).then(() => {
|
|
1586
|
+
// change button text to indicate success
|
|
1587
|
+
const button = document.getElementById("copyBtn");
|
|
1588
|
+
button.textContent = "\u2705 Copied!";
|
|
1589
|
+
setTimeout(() => {
|
|
1590
|
+
button.textContent = "\u{1F4CB} Copy All"
|
|
1591
|
+
}, 2000);
|
|
1592
|
+
}).catch(err => {
|
|
1593
|
+
console.error("Failed to copy text: ", err);
|
|
1594
|
+
alert("Failed to copy text. Please try manually.");
|
|
1595
|
+
});
|
|
1596
|
+
});
|
|
1597
|
+
</script>
|
|
1598
|
+
<div id="markdownContent">
|
|
1569
1599
|
<h1>Instructions</h1>
|
|
1570
1600
|
<ul>
|
|
1571
1601
|
<li>Following Playwright test failed.</li>
|
|
@@ -1575,7 +1605,8 @@ function convertMarkdownToHtml(markdownPath, htmlOutputPath, stepsError, resultE
|
|
|
1575
1605
|
<h1>Error Details</h1>
|
|
1576
1606
|
${errorHtml || "<p>No errors found.</p>"}
|
|
1577
1607
|
${stepsHtml || "<p>No step data available.</p>"}
|
|
1578
|
-
${markdownHtml
|
|
1608
|
+
${markdownHtml || ""}
|
|
1609
|
+
</div>
|
|
1579
1610
|
</body>
|
|
1580
1611
|
</html>
|
|
1581
1612
|
`;
|
package/dist/ortoni-report.mjs
CHANGED
|
@@ -182,7 +182,7 @@ function formatDateLocal(isoString) {
|
|
|
182
182
|
hour: "2-digit",
|
|
183
183
|
minute: "2-digit",
|
|
184
184
|
hour12: true,
|
|
185
|
-
timeZoneName: "
|
|
185
|
+
timeZoneName: "shortOffset"
|
|
186
186
|
};
|
|
187
187
|
return new Intl.DateTimeFormat(void 0, options).format(date);
|
|
188
188
|
}
|
|
@@ -1530,9 +1530,39 @@ function convertMarkdownToHtml(markdownPath, htmlOutputPath, stepsError, resultE
|
|
|
1530
1530
|
code, pre { background: #f4f4f4; padding: 0.5rem; border-radius: 5px; display: block; overflow-x: auto; }
|
|
1531
1531
|
h1, h2, h3 { color: #444; }
|
|
1532
1532
|
hr { margin: 2em 0; }
|
|
1533
|
+
#copyBtn {
|
|
1534
|
+
background-color: #007acc;
|
|
1535
|
+
color: white;
|
|
1536
|
+
border: none;
|
|
1537
|
+
padding: 0.5rem 1rem;
|
|
1538
|
+
margin-bottom: 1rem;
|
|
1539
|
+
border-radius: 5px;
|
|
1540
|
+
cursor: pointer;
|
|
1541
|
+
}
|
|
1542
|
+
#copyBtn:hover {
|
|
1543
|
+
background-color: #005fa3;
|
|
1544
|
+
}
|
|
1533
1545
|
</style>
|
|
1534
1546
|
</head>
|
|
1535
1547
|
<body>
|
|
1548
|
+
<button id="copyBtn">\u{1F4CB} Copy All</button>
|
|
1549
|
+
<script>
|
|
1550
|
+
document.getElementById("copyBtn").addEventListener("click", () => {
|
|
1551
|
+
const content = document.getElementById("markdownContent").innerText;
|
|
1552
|
+
navigator.clipboard.writeText(content).then(() => {
|
|
1553
|
+
// change button text to indicate success
|
|
1554
|
+
const button = document.getElementById("copyBtn");
|
|
1555
|
+
button.textContent = "\u2705 Copied!";
|
|
1556
|
+
setTimeout(() => {
|
|
1557
|
+
button.textContent = "\u{1F4CB} Copy All"
|
|
1558
|
+
}, 2000);
|
|
1559
|
+
}).catch(err => {
|
|
1560
|
+
console.error("Failed to copy text: ", err);
|
|
1561
|
+
alert("Failed to copy text. Please try manually.");
|
|
1562
|
+
});
|
|
1563
|
+
});
|
|
1564
|
+
</script>
|
|
1565
|
+
<div id="markdownContent">
|
|
1536
1566
|
<h1>Instructions</h1>
|
|
1537
1567
|
<ul>
|
|
1538
1568
|
<li>Following Playwright test failed.</li>
|
|
@@ -1542,7 +1572,8 @@ function convertMarkdownToHtml(markdownPath, htmlOutputPath, stepsError, resultE
|
|
|
1542
1572
|
<h1>Error Details</h1>
|
|
1543
1573
|
${errorHtml || "<p>No errors found.</p>"}
|
|
1544
1574
|
${stepsHtml || "<p>No step data available.</p>"}
|
|
1545
|
-
${markdownHtml
|
|
1575
|
+
${markdownHtml || ""}
|
|
1576
|
+
</div>
|
|
1546
1577
|
</body>
|
|
1547
1578
|
</html>
|
|
1548
1579
|
`;
|
package/dist/views/head.hbs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<head>
|
|
2
2
|
<meta charset="UTF-8" />
|
|
3
3
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
4
|
-
<meta name="description" content="Ortoni Report - V3.0.
|
|
4
|
+
<meta name="description" content="Ortoni Report - V3.0.5" />
|
|
5
5
|
<title>{{title}}</title>
|
|
6
6
|
<link rel="icon" href="https://raw.githubusercontent.com/ortoniKC/ortoni-report/refs/heads/main/favicon.png"
|
|
7
7
|
type="image/x-icon" />
|
package/dist/views/main.hbs
CHANGED
|
@@ -548,8 +548,9 @@
|
|
|
548
548
|
content += `
|
|
549
549
|
<div class="column">
|
|
550
550
|
<button
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
class="button is-primary is-fullwidth mt-3"
|
|
552
|
+
data-markdown="${test.markdownPath}"
|
|
553
|
+
onclick="openMarkdown(this)">
|
|
553
554
|
<span class="icon"><i class="fa-solid fa-file-lines"></i></span>
|
|
554
555
|
<span class="has-text-white pl-2">Open Markdown</span>
|
|
555
556
|
</button>
|
|
@@ -1271,6 +1272,15 @@
|
|
|
1271
1272
|
window.open(`${baseUrl}/trace/index.html?trace=${baseUrl}/${normalizedTracePath}`, "_blank");
|
|
1272
1273
|
}
|
|
1273
1274
|
};
|
|
1275
|
+
window.openMarkdown = (button) => {
|
|
1276
|
+
const path = button.getAttribute('data-markdown');
|
|
1277
|
+
if (path) {
|
|
1278
|
+
const normalizedPath = path.replace(/\\/g, '/');
|
|
1279
|
+
const baseUrl = Utils.getAdjustedBaseUrl();
|
|
1280
|
+
const fullUrl = `${baseUrl.replace(/\/$/, '')}/${normalizedPath.replace(/^\//, '')}`;
|
|
1281
|
+
window.open(fullUrl, '_blank');
|
|
1282
|
+
}
|
|
1283
|
+
};
|
|
1274
1284
|
window.getAdjustedBaseUrl = Utils.getAdjustedBaseUrl;
|
|
1275
1285
|
window.copyFilePath = Utils.copyFilePath
|
|
1276
1286
|
window.openHistory = () => {
|