Skip to content

Commit

Permalink
Fixes #202 - Display Scenario Outline element correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
anshooarora committed Dec 7, 2023
1 parent d1e8cba commit 47203af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
20 changes: 9 additions & 11 deletions ExtentReports/Views/Spark/Partials/SparkBDD.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
@if (node.HasChildren)
{
if (node.IsBdd && node.BddType.Name.Replace(" ", "") == "ScenarioOutline")
if (node.BddType.Name == "ScenarioOutline")
{
var css = node.Status == Status.Pass ? "collapse" : "";
var scenarios = new List<Test>(node.Children);
Expand All @@ -32,7 +32,7 @@
<div class="card-body l1">
<div class="card-header">
<div class="card-title outline-child">
<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>
<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>
@if (child.HasScreenCaptureDeep)
{
<div class="status-avatar float-right"><i class="fa fa-paperclip"></i></div>
Expand All @@ -43,15 +43,13 @@
css = child.Status == Status.Pass ? "collapse" : "";
var steps = new List<Test>(child.Children);
}
<div class="card-body mt-3 @css">
@foreach (var step in steps)
{
<div class="step @step.Status.ToString().ToLower()-bg">
<span>@step.BddType.Name @step.Name</span>
@Include("StepDetails", step)
</div>
}
</div>
@foreach (var step in steps)
{
<div class="step @step.Status.ToString().ToLower()-bg" title="@step.Description">
<span>@step.BddType.Name @step.Name</span>
@Include("StepDetails", step)
</div>
}
</div>
}
</div>
Expand Down
3 changes: 1 addition & 2 deletions ExtentReports/Views/Spark/Partials/SparkTestSPA.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
@using RazorEngine.Templating

@{
Test t = Model.Report.Tests[0];
var isbdd = Model.Report.Tests.Count > 0 && t.IsBdd ? true : false;
var isbdd = Model.Report.IsBDD;
var testList = Model.Report.Tests;
}

Expand Down

0 comments on commit 47203af

Please sign in to comment.