Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description to cucumber json #638

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Scenario: A simple feature

@workflow @slow
Scenario: Clear the screen
Clear the screen by pressing C
Given I have entered 50 into the calculator
And I have entered 70 into the calculator
When I press C
Expand All @@ -25,13 +26,15 @@ Scenario: A simple feature
"id": "clearing-screen",
"keyword": "Feature",
"name": "Clearing Screen",
"description": "In order to restart a new set of calculations\r\nAs a math idiot\r\nI want to be able to clear the screen",
"tags": [],
"line": 1,
"elements": [
{
"id": "clearing-screen;clear-the-screen",
"keyword": "Scenario",
"name": "Clear the screen",
"description": "Clear the screen by pressing C",
"line": 7,
"type": "scenario",
"tags": [
Expand All @@ -46,7 +49,7 @@ Scenario: A simple feature
{
"keyword": "Given",
"name": "I have entered 50 into the calculator",
"line": 8,
"line": 9,
"hidden": false,
"result": {
"status": "Undefined",
Expand All @@ -56,7 +59,7 @@ Scenario: A simple feature
{
"keyword": "And",
"name": "I have entered 70 into the calculator",
"line": 9,
"line": 10,
"hidden": false,
"result": {
"status": "Undefined",
Expand All @@ -66,7 +69,7 @@ Scenario: A simple feature
{
"keyword": "When",
"name": "I press C",
"line": 10,
"line": 11,
"hidden": false,
"result": {
"status": "Undefined",
Expand All @@ -76,7 +79,7 @@ Scenario: A simple feature
{
"keyword": "Then",
"name": "the screen should be empty",
"line": 11,
"line": 12,
"hidden": false,
"result": {
"status": "Undefined",
Expand Down Expand Up @@ -132,13 +135,15 @@ Scenario: A feature with a table
"id": "interactive-dhtml-view",
"keyword": "Feature",
"name": "Interactive DHTML View",
"description": "In order to increase stakeholder engagement with pickled specs\r\nAs a SpecFlow evangelist\r\nI want to adjust the level of detail in the DHTML view to suit my audience\r\nSo that I do not overwhelm them.",
"tags": [],
"line": 1,
"elements": [
{
"id": "interactive-dhtml-view;scenario-with-large-data-table",
"keyword": "Scenario",
"name": "Scenario with large data table",
"description": "",
"line": 7,
"type": "scenario",
"tags": [],
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ private string GenerateJson(List<FeatureNode> features)
id = featureId,
keyword = "Feature",
name = f.Name,
description = f.Description,
uri = this.GetUri(n),
tags = f.Tags.Select(t => new { name = t }),
line = 1,
Expand All @@ -96,6 +97,7 @@ private string GenerateJson(List<FeatureNode> features)
id = featureId+";"+fe.Slug,
keyword = fe is Scenario ? "Scenario" : "Scenario Outline",
name = fe.Name,
description = fe.Description,
line = fe.Location.Line,
type = fe is Scenario ? "scenario" : "scenario_outline",
tags = fe.Tags.Select(t => new { name = t }),
Expand Down