Rubymine does not recognize Cucumber expressions with ParameterType

Rubymine marks Cucumber steps as not defined when they are defined using a custom ParameterType. ¿Is there a workaround for that? It works fine when I run Cucumber. Here is an example:

parameter_test.feature:
Feature: Recognize Cucumber expression with user defined parameters
As a programmer
I want cucumber expressions to be recognized
So I can get real feedback about my software

Scenario: Use a custom parameter

When I use 1 cucumber expression # This is marked as not defined
And I use user defined parameters
Then the step appears as defined

Scenario: Use a more complex custom parameter

When I use complex parameters like dates as 12/12/2018 # This is marked as not defined
And I use user defined parameters
Then the step appears as defined

parameter_test_steps.rb:
ParameterType(
name: 'digits', # Only an example
regexp: /(\d+)/,
transformer: lambda { |number|
number.to_i
}
)

ParameterType(
name: 'date', # 1/2/2018, 01/12/2017
regexp: %r{(\d?\d)\/(\d?\d)\/(\d{4})},
transformer: lambda { |day, month, year|
Time.new(year,month,day)
}
)

When('I use {digits} cucumber expression') do |digits|
pending # Write code here that turns the phrase above into concrete actions
end

When('I use complex parameters like dates as {date}') do |digits|
pending # Write code here that turns the phrase above into concrete actions
end

And('I use user defined parameters') do
pending # Write code here that turns the phrase above into concrete actions
end

Then('the step appears as defined') do
pending # Write code here that turns the phrase above into concrete actions
end
2
2 comments

Hello,

we have a corresponding feature request on our tracker so please add your vote and follow it:

https://youtrack.jetbrains.com/issue/RUBY-20444

0
Avatar
Permanently deleted user

Done, thanks!

0

Please sign in to leave a comment.