Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions src/TUnit.Engine/Reporters/Html/TestReport.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,8 @@

/* ============================== run view ============================== */
.run-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 28px 80px; }
.run-grid-1 { display: grid; grid-template-columns: 320px 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .run-grid-1 { grid-template-columns: 1fr; } }
.run-grid-1 { display: grid; grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .run-grid-1 { grid-template-columns: minmax(0, 1fr); } }
.run-grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .run-grid-2 { grid-template-columns: 1fr; } }

Expand Down Expand Up @@ -656,6 +656,8 @@
/* strip card */
.strip-card { padding: 20px; }
.strip-card .card-title { margin-bottom: 14px; }
.outcome-strip-scroll { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.outcome-strip-content { width: max-content; min-width: 100%; }
.outcome-strip { display: flex; gap: 1px; height: 60px; align-items: stretch; }
.outcome-strip .tick { flex: 1; min-width: 2px; border-radius: 2px; opacity: 0.85; transition: opacity 100ms, transform 100ms; cursor: pointer; }
.outcome-strip .tick:hover { opacity: 1; transform: scaleY(1.06); }
Expand Down Expand Up @@ -994,7 +996,7 @@

/* run view: stacked, tighter */
.run-wrap { padding: 20px 18px 80px; }
.run-grid-1, .run-grid-2 { grid-template-columns: 1fr; gap: 12px; }
.run-grid-1, .run-grid-2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.donut-card { padding: 18px; }
.panel-head { padding: 12px 16px; }
}
Expand Down Expand Up @@ -1236,11 +1238,15 @@ <h3>Select a test</h3>

<div class="card strip-card">
<div class="card-title">Outcome timeline</div>
<div class="outcome-strip" id="strip"></div>
<div class="strip-axis">
<span id="stripStart">start</span>
<span id="stripMid"></span>
<span id="stripEnd">end</span>
<div class="outcome-strip-scroll">
<div class="outcome-strip-content">
<div class="outcome-strip" id="strip"></div>
<div class="strip-axis">
<span id="stripStart">start</span>
<span id="stripMid"></span>
<span id="stripEnd">end</span>
</div>
</div>
</div>
</div>
</div>
Expand Down
24 changes: 24 additions & 0 deletions tests/TUnit.Engine.Tests/HtmlReporterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,30 @@ public void GenerateHtml_SubstitutesTitleAndProjectPlaceholders()
html.ShouldContain("id=\"projectName\">MyProject.Tests<");
}

[Test]
public void GenerateHtml_EmitsOutcomeTimelineOverflowCss()
{
var html = HtmlReportGenerator.GenerateHtml(new ReportData
{
AssemblyName = "Tests",
MachineName = "machine",
Timestamp = "2026-08-09T00:00:00.0000000Z",
TUnitVersion = "1.0.0",
OperatingSystem = "Windows",
RuntimeVersion = ".NET 10.0",
TotalDurationMs = 0,
Summary = new ReportSummary(),
Groups = [],
});

html.ShouldContain("grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1fr)");
html.ShouldContain("@media (max-width: 1100px) { .run-grid-1 { grid-template-columns: minmax(0, 1fr); } }");
html.ShouldContain(".run-grid-1, .run-grid-2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }");
html.ShouldContain(".outcome-strip-scroll { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }");
html.ShouldContain(".outcome-strip-content { width: max-content; min-width: 100%; }");
html.ShouldContain("<div class=\"outcome-strip-scroll\">");
}

[Test]
public void GenerateHtml_EmitsAttemptsArray_WhenTestWasRetried()
{
Expand Down
Loading