-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
Only suggest parameter types when text is surrounded by whitespace #657
Comments
* Add tests describing issue #657 * Force ParameterTypeMatcher to match full words * Enable choosing it custom ParameterType must match a full word or not - default is true - default parameters do not force matching a word (to be discussed) - updated some tests so they keep passing * Take into account punctuation when suggesting parameters * Java: Don't suggest parameter unless at beginning/end or surrounded by space/punctuation Also: Remove an obsolete test, update other tests and improve float/double matching * Remove "force_full_word" parameter when creating ParameterType Also use \p{P} instead of [[:punct]] to have the same implementation across multiple languages Update tests so they still reflect expected behavior even with word matching * Port tests from cucumber-expressions/ruby to reflect issue #657 * Only propose full words as parameters in cucumber-expressions/javascript Also adapt tests so they reflect those changes * Fixed rspec organization so the test name make sense * Port tests from cucumber-expressions/ruby to cucumber-expressions/go to reflect issue #657 * Do not suggest in-word parameters in cucumber-expressions/go Also update test to reflect the changes * Apply @luke-hill review for a more ruby-ish code * Undo changes unrelated to matching words * Extract groupMatchesFullWord method for clarity
Perhaps an unintended consequence, but now numerical parameters with units are not recognised by the snippet generator: |
Maybe it could be interesting to have some built-in "units" type ( |
Imagine the following parameter type is defined:
This could be used with the following step definition:
However, if we add two new undefined Gherkin steps:
That should suggest:
But it should not suggest:
Instead, it should simply suggest:
Parameters should only be suggested when the text is surrounded by whitespace, or when it's at the beginning or end of the step. That's what users would expect.
The text was updated successfully, but these errors were encountered: