Skip to content

Commit 7d53dc9

Browse files
committed
Fixes #149 - Screenshots for BDD nodes
1 parent 630d843 commit 7d53dc9

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

ExtentReports/ExtentReports.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32+
<None Remove="Views\Spark\Partials\SparkMediaTest.cshtml" />
3233
<None Remove="Views\Spark\SparkIndexSPA.cshtml" />
3334
<None Remove="Views\Spark\Partials\Navbar.cshtml" />
3435
<None Remove="Views\Spark\Partials\AttributesView.cshtml" />
@@ -75,6 +76,7 @@
7576
<None Remove="Gherkin\Resource\lang.json" />
7677
</ItemGroup>
7778
<ItemGroup>
79+
<EmbeddedResource Include="Views\Spark\Partials\SparkMediaTest.cshtml" />
7880
<EmbeddedResource Include="Views\Spark\SparkIndexSPA.cshtml" />
7981
<EmbeddedResource Include="Views\Spark\Partials\Navbar.cshtml" />
8082
<EmbeddedResource Include="Views\Spark\Partials\AttributesView.cshtml" />

ExtentReports/Reporter/ExtentSparkReporter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ private void AddTemplates()
9797
"Partials.SparkStepDetails",
9898
"SparkIndexSPA",
9999
"Partials.SparkMedia",
100+
"Partials.SparkMediaTest",
100101
"Partials.SparkTestSPA",
101102
"Partials.SparkAuthorSPA",
102103
"Partials.SparkDeviceSPA",

ExtentReports/Views/Spark/Partials/SparkBDD.cshtml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@if (Model.HasChildren)
88
{
99
var children = new List<Test>(Model.Children);
10+
@Include("SparkMediaTest", Model)
1011
<div class="accordion mt-4">
1112
@foreach (var node in children)
1213
{
@@ -37,6 +38,7 @@
3738
{
3839
<div class="status-avatar float-right"><i class="fa fa-paperclip"></i></div>
3940
}
41+
@Include("SparkMediaTest", child)
4042
</div>
4143
</div>
4244
@{
@@ -48,6 +50,7 @@
4850
<div class="step @step.Status.ToString().ToLower()-bg" title="@step.Description">
4951
<span>@step.BddType.Name @step.Name</span>
5052
@Include("StepDetails", step)
53+
@Include("SparkMediaTest", step)
5154
</div>
5255
}
5356
</div>
@@ -60,11 +63,13 @@
6063
var steps = new List<Test>(node.Children);
6164
<div class="@css">
6265
<div class="card-body">
66+
@Include("SparkMediaTest", node)
6367
@foreach (var child in steps)
6468
{
6569
<div class="step @child.Status.ToString().ToLower()-bg" title="@child.Description">
6670
<span>@child.BddType.Name @child.Name</span>
6771
@Include("StepDetails", child)
72+
@Include("SparkMediaTest", child)
6873
</div>
6974
}
7075
</div>
@@ -75,3 +80,4 @@
7580
}
7681
</div>
7782
}
83+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@using System
2+
3+
@if (Model.HasScreenCapture)
4+
{
5+
foreach (var media in Model.Media)
6+
{
7+
@Include("SparkMedia", media)
8+
}
9+
}

0 commit comments

Comments
 (0)