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

Scenario outline with <parameters> from Examples section in title. #1024

Closed
unekhriukova opened this issue Apr 18, 2017 · 5 comments
Closed

Comments

@unekhriukova
Copy link

unekhriukova commented Apr 18, 2017

Hello, guys.
I've found a possibility of using the from Examples section in the Scenario Outline title in the Cucumber: cucumber/cucumber-js#267
I've tried to use this in behat, but it does not work for me.
In PhpStorm when I use this parameter in title, it is highlighted and 'go to source' command moves the cursor to the same name column in Examples section.
When tests are run, I see the parameter is not substituted to its value, just stayed as it is,
e.g.

Scenario Outline: Login with <email>.

Seems like this feature is not implemented yet in behat, may be it will be a good idea to do it.

@spolischook
Copy link

Is it just for title customizing or it also will be a step implementation?

@unekhriukova
Copy link
Author

As a step implementation this feature is already exist. So just for title customizing.

@volkyeth
Copy link

Well, I can't see how the Scenario Outline: Login with <email>. would have it's token replaced. From which Example line would it get its replacement?

For the pretty formatter the ExampleNode titles are not even printed, only the OutlineNode title.

On the other hand, I believe it makes sense in case any other formatter uses the ExampleNode title.

Anyway, this would be done on the Gherkin package (https://github.com/Behat/Gherkin/blob/master/src/Behat/Gherkin/Node/OutlineNode.php#L207), not on Behat core.
You should close this issue and open another one on https://github.com/Behat/Gherkin

@volkyeth
Copy link

For the pretty formatter the ExampleNode titles are not even printed, only the OutlineNode title.
Correction: ExampleNode titles are printed, and they're the corresponding line on the examples table

@everzet
Copy link
Member

everzet commented Sep 2, 2017

@bwowk once again - thanks for nudging in :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants