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

support steps defined with strings instead of regexes #35

Closed
capaj opened this issue Jan 28, 2017 · 8 comments
Closed

support steps defined with strings instead of regexes #35

capaj opened this issue Jan 28, 2017 · 8 comments
Assignees
Milestone

Comments

@capaj
Copy link

capaj commented Jan 28, 2017

steps which are defined with strings are not autocompleted

@alexkrechik
Copy link
Owner

Looks like new format should be supported without any code changes. Do you have any unsupported cases examples ?

@capaj
Copy link
Author

capaj commented Jan 28, 2017

@alexkrechik will post a sample

@capaj
Copy link
Author

capaj commented Jan 28, 2017

@alexkrechik I've just made the simplest possible cucumber-js sample and there I get the squiggly lines:

Imgur

And no autocomplete:

Imgur

@alexkrechik
Copy link
Owner

Looks like, steps definitions first argument should be regexp's (https://github.com/cucumber/cucumber-js/blob/master/CHANGELOG.md#200-rc4-2016-12-19):
defineSupportCode(function({Given, setWorldConstructor}) {
Given(/^a step$/, function() {});
setWorldConstructor(CustomWorld);
});

But, in your app, step definitions first argument type is string:
Given('I am on the Cucumber.js GitHub repository', function () {
return this.driver.get('https://github.com/cucumber/cucumber-js/tree/master')
})

Are you sure, that they are valid?

@capaj
Copy link
Author

capaj commented Jan 28, 2017

@alexkrechik of course they are. you can try it out by installing deps and running ./node_modules/.bin/cucumber-js

The sample is taken from the official documentation here: https://github.com/cucumber/cucumber-js/blob/master/docs/nodejs_example.md

@capaj
Copy link
Author

capaj commented Jan 28, 2017

@alexkrechik so I tried with regexes and you were right-those work just fine. Thanks for your response. I will rename this bug then.

@capaj capaj changed the title support cucumber 2.0.0 support step defined with strings instead of regexes Jan 28, 2017
@capaj capaj changed the title support step defined with strings instead of regexes support steps defined with strings instead of regexes Jan 28, 2017
@alexkrechik
Copy link
Owner

Will be fixed with #39 in the nearest release.

@alexkrechik alexkrechik added this to the 2.1.0 milestone Feb 3, 2017
alexkrechik added a commit that referenced this issue Feb 7, 2017
@alexkrechik alexkrechik assigned alexkrechik and unassigned capaj Feb 10, 2017
@alexkrechik
Copy link
Owner

Should be fixed in 2.1.0 version of plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants