Files
gh-jeremylongshore-claude-c…/skills/visual-regression-tester/assets/html_report_template.html
2025-11-30 08:23:48 +08:00

139 lines
3.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Visual Regression Test Report</title>
<style>
/* Inline CSS for styling */
body {
font-family: sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
color: #333;
}
.container {
max-width: 960px;
margin: 20px auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
margin-bottom: 20px;
color: #007bff;
}
h2 {
margin-top: 30px;
margin-bottom: 10px;
color: #333;
}
.test-suite {
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 4px;
padding: 10px;
}
.test-case {
margin-bottom: 10px;
padding: 10px;
border: 1px solid #eee;
border-radius: 4px;
background-color: #f9f9f9;
}
.test-case h3 {
margin-top: 0;
margin-bottom: 5px;
font-size: 1.2em;
}
.image-comparison {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 10px;
}
.image-container {
flex: 1 1 300px;
text-align: center;
border: 1px solid #ccc;
padding: 5px;
border-radius: 4px;
background-color: #fff;
}
.image-container img {
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
}
.status-passed {
color: green;
}
.status-failed {
color: red;
}
.status-pending {
color: orange;
}
.footer {
text-align: center;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #eee;
color: #777;
}
/* Responsive adjustments */
@media (max-width: 600px) {
.container {
padding: 10px;
margin: 10px auto;
}
.image-comparison {
flex-direction: column;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Visual Regression Test Report</h1>
<p><strong>Date:</strong> {{report_date}}</p>
<p><strong>Generated By:</strong> Visual Regression Tester Plugin</p>
<h2>Summary</h2>
<p><strong>Total Tests:</strong> {{total_tests}}</p>
<p><strong>Passed:</strong> <span class="status-passed">{{passed_tests}}</span></p>
<p><strong>Failed:</strong> <span class="status-failed">{{failed_tests}}</span></p>
<p><strong>Pending:</strong> <span class="status-pending">{{pending_tests}}</span></p>
<h2>Test Results</h2>
{{test_results}} <!-- Placeholder for dynamically generated test results -->
<div class="footer">
<p>Report generated by Visual Regression Tester plugin.</p>
</div>
</div>
</body>
</html>