-
Notifications
You must be signed in to change notification settings - Fork 9
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
Define Steps does produces incorrect regex for step definition attribute #28
Comments
@gasparnagy - I've attempted to find an authoritative source online for what characters are legal in a step, but not having any luck finding anything that addresses this question. Which non-alphanumeric characters are allowed (or not allowed)? |
Thanks
…On Wed, 19 June 2024, 01:48 Chris Rudolphi, ***@***.***> wrote:
@gasparnagy <https://github.com/gasparnagy> - I've attempted to find an
authoritative source online for what characters are legal in a step, but
not having any luck finding anything that addresses this question. Which
non-alphanumeric characters are allowed (or not allowed)?
With that, I'll take a look at what needs to be changed to address this
issue.
—
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADFDDRHQUJPGLF4KPYD5L3ZIBJGRAVCNFSM6AAAAABJMIOK46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGQZDSMZXGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@TimMurphy here are my findings so far. [When(@"I call the integer\.ToString\(\) method")]
public void WhenICallTheInteger_ToStringMethod()
{
throw new PendingStepException();
} Would the above work for you? Are you wanting to use Regex expressions or Cucumber expressions? "trace": { "stepDefinitionSkeletonStyle": "RegexAttribute" }, See the Documentation for details on the reqnroll.json configuration file. HTH. |
That works perfect;y. Thanks for that and for all your work to create and main Reqnrol |
For the record, the cucumber expression syntax specification is here: https://github.com/cucumber/cucumber-expressions?tab=readme-ov-file#escaping |
@TimMurphy Thank you for your sponsorship! 🙏🤘 |
Good to know but I rather have "clean" specs with regex steps. |
Used Visual Studio
Visual Studio 2022
Are the latest Visual Studio updates installed?
Yes
Content of reqnroll.json (if present)
Issue Description
When a step in a feature includes brackets (), the regex for the step definition created by Define Steps... is incorrect .
As an example if you have the following step
The generated step is:
Notice how the brackets of the steps are written as \). The generated code should be:
Steps to Reproduce
Create a feature with the following scenario.
Right click in the feature file and select Define Steps....
The Define Steps window will show the when step as
Link to a project repository that reproduces the issue
No response
The text was updated successfully, but these errors were encountered: