Multiple gherkin step definition for method #3670

Closed
gimler opened this Issue Nov 2, 2016 · 0 comments

Projects

None yet

2 participants

@gimler
Contributor
gimler commented Nov 2, 2016

What are you trying to achieve?

Multiple gherkin step definition for method

What do you get instead?

bin/codecept gherkin:steps functional

Steps from default context:
+-------------------------------------------------------------------------------+---------------------------------------+
| Step                                                                          | Implementation                        |
+-------------------------------------------------------------------------------+---------------------------------------+
| I click :value                                                                | FunctionalTester::press               |
+-------------------------------------------------------------------------------+---------------------------------------+

FunctionalTester.php

    /**
     * @Then I click :value
     * @Then I click :value in :context
     */
    public function press($link, $context = null)
    {
        $this->click($link, $context);
    }

Details

  • Codeception version: Codeception version 2.2.6

  • PHP Version:
    PHP 5.6.27 (cli) (built: Oct 15 2016 19:56:04)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

  • Operating System:
    linux

  • Installation type: Phar || Composer
    composer

  • List of installed packages (composer show)

  • Suite configuration:

class_name: FunctionalTester
modules:
    enabled:
        - WebDriver:
             host: phantomjs
             port: 8643
             url: 'http://www.example.com/'
             browser: phantomjs
        - \Helper\Functional
@Naktibalda Naktibalda added the Gherkin label Nov 2, 2016
@DavertMik DavertMik closed this in #3796 Dec 3, 2016
@DavertMik DavertMik added a commit that referenced this issue Dec 3, 2016
@DavertMik DavertMik Gherkin: Multiple definitions for steps supported. (#3796)
* Multiple definitions for steps supported. Fixes #3670

* added unit test for multiple contexts
33dd0f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment