Skip to content

Commit 47203af

Browse files
committed
Fixes #202 - Display Scenario Outline element correctly
1 parent d1e8cba commit 47203af

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

ExtentReports/Views/Spark/Partials/SparkBDD.cshtml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</div>
2323
@if (node.HasChildren)
2424
{
25-
if (node.IsBdd && node.BddType.Name.Replace(" ", "") == "ScenarioOutline")
25+
if (node.BddType.Name == "ScenarioOutline")
2626
{
2727
var css = node.Status == Status.Pass ? "collapse" : "";
2828
var scenarios = new List<Test>(node.Children);
@@ -32,7 +32,7 @@
3232
<div class="card-body l1">
3333
<div class="card-header">
3434
<div class="card-title outline-child">
35-
<div class="node" id="@child.Id"><span class="badge log @child.Status.ToString().ToLower()-bg mr-2">@child.Status</span>@child.BddType.Name: @child.Name</div>
35+
<div class="node mb-3" id="@child.Id"><span class="badge log @child.Status.ToString().ToLower()-bg mr-2">@child.Status</span>@child.BddType.Name: @child.Name</div>
3636
@if (child.HasScreenCaptureDeep)
3737
{
3838
<div class="status-avatar float-right"><i class="fa fa-paperclip"></i></div>
@@ -43,15 +43,13 @@
4343
css = child.Status == Status.Pass ? "collapse" : "";
4444
var steps = new List<Test>(child.Children);
4545
}
46-
<div class="card-body mt-3 @css">
47-
@foreach (var step in steps)
48-
{
49-
<div class="step @step.Status.ToString().ToLower()-bg">
50-
<span>@step.BddType.Name @step.Name</span>
51-
@Include("StepDetails", step)
52-
</div>
53-
}
54-
</div>
46+
@foreach (var step in steps)
47+
{
48+
<div class="step @step.Status.ToString().ToLower()-bg" title="@step.Description">
49+
<span>@step.BddType.Name @step.Name</span>
50+
@Include("StepDetails", step)
51+
</div>
52+
}
5553
</div>
5654
}
5755
</div>

ExtentReports/Views/Spark/Partials/SparkTestSPA.cshtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
@using RazorEngine.Templating
66

77
@{
8-
Test t = Model.Report.Tests[0];
9-
var isbdd = Model.Report.Tests.Count > 0 && t.IsBdd ? true : false;
8+
var isbdd = Model.Report.IsBDD;
109
var testList = Model.Report.Tests;
1110
}
1211

0 commit comments

Comments
 (0)