extent-framework / extentreports-csharp

Extent Reporting Library, .NET
http://extentreports.com
Apache License 2.0
50 stars 40 forks source link

Gherkin keywords don't appear in the extent report #78

Closed Duke482132 closed 4 years ago

Duke482132 commented 4 years ago

I am appending my steps to a given scenario, despite passing step type it is not being rendered in the report:

private static ExtentTest _extentScenario;
....
[AfterStep]
public void AfterStep(ScenarioContext scenarioContext)
{
       var stepType = ScenarioStepContext.Current.StepInfo.StepDefinitionType.ToString();
       var scenarioStepContext = scenarioContext.StepContext;
       _extentScenario.CreateNode(new GherkinKeyword(stepType), scenarioStepContext.StepInfo.Text); //step type has correct value

enforcing the step type also doesn't do anything

_extentScenario.CreateNode<Given>(scenarioStepContext.StepInfo.Text);

This is what I get, but I expect to Given,When,Then,And to be rendered.

enter image description here

and this is what I want:

enter image description here

Furthermore we can see that proper classes are added:

enter image description here

anshooarora commented 4 years ago

The fix will be part of the next release.