Skip to content

Commit

Permalink
fix: scenario template (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
hedhyw authored Sep 16, 2023
1 parent 41ec35d commit 5ec9a21
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion internal/docplugin/goplugin/goplugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ func (p GoPlugin) handleStruct(
}

func formatScenarioKeyword(keyword string) string {
if strings.ToLower(keyword) == "scenario outline" {
keywordLower := strings.ToLower(keyword)

if keywordLower == "scenario outline" || keywordLower == "scenario template" {
keyword = "Scenario"
}

Expand Down
2 changes: 1 addition & 1 deletion internal/generator/examples/default/issue_26.feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"PluginData": {}
},
"Tags": [],
"Keyword": "Scenario Outline",
"Keyword": "Scenario Template",
"Name": "Just a hello world",
"Description": "",
"Steps": [],
Expand Down
2 changes: 1 addition & 1 deletion internal/generator/examples/issue_26.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Feature: Issue example
Scenario Outline: Just a hello world
Scenario Template: Just a hello world
Examples:
| <name> |
| hello world |
2 changes: 1 addition & 1 deletion internal/generator/examples/parallel/issue_26.feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"PluginData": {}
},
"Tags": [],
"Keyword": "Scenario Outline",
"Keyword": "Scenario Template",
"Name": "Just a hello world",
"Description": "",
"Steps": [],
Expand Down

0 comments on commit 5ec9a21

Please sign in to comment.