tpope / vim-cucumber

Vim Cucumber runtime files

Home Page:http://www.vim.org/scripts/script.php?script_id=2973

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not finding available step

JESii opened this issue · comments

I have a step definition:

When(/^I navigate to any "(\d+)" PDP page(?:s?)$/) do |pdp_page_count|

and I access it with:

    When I navigate to any "2" PDP pages

However, when I try to jump to the definition, all I get is:

E388: Couldn't find definition

It all works when I run Cucumber...

Do other steps work? That's a built-in Vim error, which implies the built-in behavior is being invoked rather than cucumber's override.

I believe they did, but I can't swear to it... I'll go back and do several tests and let you know the results.

OK; here's what I did/got:

  1. Checked out the branch again and created a local branch so that I'm not in detached HEAD state (on the off-chance that makes a difference)
  2. ran my 'buildtags' command which is defined by (uses exuberant_ctags):
 alias buildtags='ctags -R . $(bundle list --paths)'
  1. Opened up the FF and started with the first three steps in the first scenario:
  Scenario: To verify the Recently Viewed section in collapsed state when I navigate to PDP page for first time
    Given I am on mobile web home page
    When I navigate to any "1" PDP page
    Then I should not see Recently Viewed section below the Recommended Items on PDP page

The first step results in Multiple matching steps found
The second step (original question) results in the E388 message
The third step finds the SD which is in the same file as the SD for the second step. This step is defined as:

Then(/^I (should not|should) see Recently Viewed section below the Recommended Items on PDP page$/) do |should_type|

As a double-check, I then tried to navigate to this step later in the FF

    When I navigate to any "10" PDP pages

and this time I got the Multiple matching steps found message.

One more interesting thing: I then went back to the original step ('...to "1" PDP page') and now I get a Multiple matching steps found message.

HTH

You can give a count (e.g., 1]d) to see the nth matching step. If you're sometimes getting E388 you're probably just typing ]d too slowly.

OK; thanks... and of course, now I'm not getting any E388's so I'll make sure not to wait too long after the ]