-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GherkinParser): steps with arguments now works correctly
- Loading branch information
Showing
5 changed files
with
106 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Feature: Parser Should Support DocStrings | ||
|
||
Scenario: A scenario with a docstring | ||
Given a blog post named "Random" with Markdown body | ||
""" | ||
Some Title, Eh? | ||
=============== | ||
Here is the first paragraph of my blog post. Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit. | ||
""" | ||
|
||
Scenario: A scenario with a docstring and multiple whitespace and vars | ||
Given a blog post named "Random" with Markdown body | ||
""" | ||
😂🚲🚓 | ||
(❁´◡`❁) | ||
(*/ω\*) | ||
(^///^) | ||
this text contains spaces | ||
and ${TEST NAME} | ||
""" | ||
|
||
Scenario: A scenario with a backtick in the docstring | ||
Given a blog post named "Random" with Markdown body | ||
```python | ||
😂🚲🚓 | ||
(❁´◡`❁) | ||
(*/ω\*) | ||
(^///^) | ||
this text contains spaces | ||
and ${TEST NAME} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Feature: Scenario Outline with a docstring | ||
|
||
Scenario Outline: Greetings come in many forms | ||
Given this file: | ||
"""<type> | ||
Greeting:<content> | ||
""" | ||
|
||
Examples: | ||
| type | content | | ||
| en | Hello | | ||
| fr | Bonjour | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,35 @@ | ||
*** Settings *** | ||
Library step_impls.py | ||
Library step_impls.py | ||
|
||
|
||
*** Keywords *** | ||
the minimalism | ||
Log yeah | ||
|
||
Table with example | ||
[Arguments] ${blah} | ||
[Tags] gherkin:step | ||
[Arguments] ${rows} | ||
|
||
FOR ${index} ${row} IN ENUMERATE @{rows} | ||
Log ${index} ${{", ".join((c["value"] for c in $row["cells"]))}} | ||
END | ||
|
||
FOR ${row} IN @{rows} | ||
FOR ${cell} IN @{row}[cells] | ||
Log ${cell["value"]} | ||
END | ||
END | ||
|
||
a blog post named "${name}" with Markdown body | ||
[Tags] gherkin:step | ||
[Arguments] ${body} | ||
|
||
Log ${name} | ||
Log ${body} | ||
|
||
this file: | ||
[Tags] gerkin:step | ||
[Arguments] ${content} ${mediaType}= | ||
|
||
log ${blah} | ||
Log ${content} | ||
Log ${mediaType} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters