feat: init files

This commit is contained in:
2025-06-17 22:58:08 +08:00
parent 3c77faf93e
commit 6b090a93c9
10 changed files with 385 additions and 0 deletions

29
inject-css.js Normal file
View File

@ -0,0 +1,29 @@
const fs = require("fs");
const path = require("path");
const reportPath = path.join(__dirname, "reports", "cucumber-html-report.html");
const cssToInject = `
<style>
.feature-passed > .col-lg-6 {
width: 100% !important;
max-width: 100% !important;
flex: 0 0 100% !important;
}
.feature-passed > .col-lg-6 > .panel {
width: 100% !important;
}
</style>
`;
fs.readFile(reportPath, "utf8", (err, data) => {
if (err) throw err;
const modified = data.replace("</head>", `${cssToInject}</head>`);
fs.writeFile(reportPath, modified, "utf8", (err) => {
if (err) throw err;
console.log("Custom CSS injected successfully!");
});
});