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

SnippetGenerator recognises parameters from Scenario Outline (<param>) #1078

Merged
merged 1 commit into from
May 29, 2017
Merged

SnippetGenerator recognises parameters from Scenario Outline (<param>) #1078

merged 1 commit into from
May 29, 2017

Conversation

avokin
Copy link
Contributor

@avokin avokin commented Oct 31, 2016

Summary

SnippetGenerator recognises outline step parameters

Details

SnippetGenerator - added pattern for <param>
ArgumentPattern - added possibility to provide custom replacement string
JavaSnippetTest - test

Motivation and Context

SnippetGenerator should suggest correct step definition for Scenario Outline Steps. At the moment cucumber-jvm creates step definition like this:

@Given("^Given a step with <param> from Scenario Outline$")
public void given_a_step() {
...
}

Fix makes the following step definition:

@Given("^Given a step with (.*) from Scenario Outline$")
public void given_a_step(String arg0) {
...
}

We have related issue in tracker of IntelliJ IDEA: https://youtrack.jetbrains.com/issue/IDEA-160330

How Has This Been Tested?

Fix tested like tested all other patterns for step parameters. See JavaSnippetTest

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mpkorstanje mpkorstanje merged commit 43776a3 into cucumber:master May 29, 2017
@mpkorstanje
Copy link
Contributor

Very nifty. Thank you!

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants