-
Notifications
You must be signed in to change notification settings - Fork 20
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
Feature/Scenario description can only be 1 line #10
Comments
This should now be fixed. |
This does not appear to be fixed. I was able to duplicate the issue by adding a multiline scenario to the test in the src code as well as existing rust projects now using the latest library. Feature: Everything Scenario: Nothing Scenario: Multiline
|
The issue seems to be with this rule in the new parser: My employer limits what I can contribute to open source projects. I'll see what I can do to help though. |
Ah, I misunderstood the issue. I'll look into it when I have time, unless somebody else does it first. |
Unfortunately I wasn't given clearance to contribute (not that I'm particularly proficient at rust yet anyway). But I think the solution will be along the answers of making a rule that says "newline followed by any whitespace followed by one of the 3 main gherkin keywords": rule test_case_start() -> &'input str = n: $(nl() _ (env.keywords().given() / env.keywords().when() / env.keywords().then)) { n } The above won't compile, but it can hopefully steer someone in the correct direction. |
Fixed in v0.8.4. |
0.8.4 was yanked due to causing other parsing issues. |
This is fixed in 0.9.0. Arbitrary descriptions below scenarios are not supported by the specification, and so are not included. |
It isn't obvious, but gherkin does support multi-line scenarios. Here is a multi-line test case out of the official mono-repository, which has been used to test other language implementations: I think it would perhaps be worthwhile to move these official test cases to cucumber-rust/gherkin-rust as they would serve as a source of truth on how cucumber should behave (which ultimately is the point of the feature files anyway). |
Of course there's tests for something described absolutely nowhere. Supporting cucumber is seriously painful, haha. |
@ilslv is it still relevant? |
@tyranron yes, as only |
@tyranron yes, this issue should be fully covered. |
- add `description` field to `Background`, `Examples`, `Rule` and `Scenario` (#10) - make `name` field of `Background` required - make `table` field of `Examples` optional Co-authored-by: ilslv <[email protected]>
Released in |
One of the primary benefits of BDD is that it produces living documentation. This can be particularly effective when the gherkin is post-processed by something like AsciiDoctor to provide URLs, images, mathematical notation, etc in a convenient, easy to read and useful document.
However, unlike other parsers this one appears to crash if the descriptions for Features/Scenarios are more than one line long or have any whitespace
Steps to reproduce-> Use the following Gherkin
Feature: Living Documentation
Living documentation is used by may companies, including those with mission critical objectives such as healthcare. In these cases, the documentation is the source of truth and is central to the businesses operations.
Not being able to document or provide mark up or other useful features limits the viability of what is supposed to be a source of truth.
Scenario: Adequate Description for core operations.
We definitely want to be able to do this.
Given I am writing living documentation
And many levels of management, coworkers and others rely on it
Then I need to have lengthier descriptions for features and scenarios
The text was updated successfully, but these errors were encountered: