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

PyString not considered as step arg by gherkin:snippets and when validating steps before running them #4121

Closed
kuntashov opened this Issue Apr 11, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@kuntashov
Contributor

kuntashov commented Apr 11, 2017

What are you trying to achieve?

I have two the same steps but first has inline argument and second PyString argument:

InlineExample.feature

  Scenario: Inline argument
    ...
    Then I see output "test"
    ...

PyStringExample.feature

  Scenario: PyString argument
    ...
    Then I see output
      """
      First line
      Second line
      """
    ...

I want them all to be considered as the same steps:

  1. gherkin:snippets command generates same snippet for this step for both feature:
    /**
     * @Then I see output :arg1
     */
     public function iSeeOutput($arg1)
     {
        throw new \Codeception\Exception\Incomplete("Step `I see output :arg1` is not defined");
     }
  1. Suppose I defined all steps for InlineExample.feature including I see output step.
    When I run PyStringExample.feature then Codeception sees that I see output already defined and shows only really incompleted steps.

What do you get instead?

Now Codeception considers same steps with inline and PyString argument as different steps:

  1. For InlineExample.feature step generated with argument (public function iSeeOutput($arg1)) and for PyStringExample.feature we get snippet without arg (public function iSeeOutput())
  2. If I defined all steps for InlineExample.feature and then run PyStringExample.feature then Codeception shows I see output step as incompleted.

Details

  • Codeception version: 2.2.10

@kuntashov kuntashov changed the title from PyString next to step not considered as step argument by gherkin:snippets and when validating steps before running them to PyString not considered as step argument by gherkin:snippets and when validating steps before running them Apr 11, 2017

@kuntashov kuntashov changed the title from PyString not considered as step argument by gherkin:snippets and when validating steps before running them to PyString not considered as step arп by gherkin:snippets and when validating steps before running them Apr 11, 2017

@kuntashov kuntashov changed the title from PyString not considered as step arп by gherkin:snippets and when validating steps before running them to PyString not considered as step arg by gherkin:snippets and when validating steps before running them Apr 11, 2017

@Naktibalda Naktibalda added the Gherkin label Apr 11, 2017

@DavertMik DavertMik closed this in #4125 Apr 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment