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

Fail to handle step definition with a placeholder #14

Open
title-earnin opened this issue May 30, 2024 · 8 comments
Open

Fail to handle step definition with a placeholder #14

title-earnin opened this issue May 30, 2024 · 8 comments

Comments

@title-earnin
Copy link

image

This is a project that's created executing dotnet new reqnroll-project -t xunit.
The feature could detect only step without any placeholder, but report a warning on steps with placeholders.

Rider version

2024.1.2

Platform

Apple M3 Max Sonoma 14.5

reqnroll

2024.1.5

repository

https://github.com/title-earnin/reqnroll

@ajeckmans
Copy link
Contributor

ajeckmans commented Jun 3, 2024

See https://github.com/reqnroll/Reqnroll.Rider?tab=readme-ov-file#limitations
This extension only supports RegEx step matching for now. Unfortunately the sample default to the newer cucumber expression step bindings.

@wojciechrak
Copy link

@ajeckmans are there any plans for adding cucumber expressions?

@Socolin
Copy link
Collaborator

Socolin commented Jun 18, 2024

Yes, I don't have much time and I have other priorities lately. If someone wants to work on this I can help.

@ajeckmans
Copy link
Contributor

I have a bit too much work with that one other change I need done in ReqnRoll.
Also my last change in this plugin was definitely a rollercoaster ^^

@wojciechrak
Copy link

If you can point to similar implementation (maybe in Visual Studio plugin?) then I'll try getting my hands dirty. Never worked on IDE plugin, though, so no promises.

@Socolin
Copy link
Collaborator

Socolin commented Jun 18, 2024

I think every pieces are already here, the only missing thing is to read the settings, and then use it to know if we need to use a regex or expressions.

I don't know if Reqnroll only support one or the other in the config, or if it can be mixed through various assembly ?

Basically the code to change is where we use Regex we need either 2 different class, or have 2 property Regex / CucumberExpression and depending on which one we have the match logic will change a bit.

I think already changing the following things should already give a pretty good result, after just follow where the regex / Pattern is used.

Change the cache (Parse the cucumber expression here)
https://github.com/reqnroll/Reqnroll.Rider/blob/main/src/dotnet/ReSharperPlugin.ReqnrollRiderPlugin/Caching/StepsDefinitions/ReqnrollStepsDefinitionMergeData.cs#L33-L34

Replace the IsMatch here
https://github.com/reqnroll/Reqnroll.Rider/blob/main/src/dotnet/ReSharperPlugin.ReqnrollRiderPlugin/References/ReqnrollStepDeclarationReference.cs#L60

Adjust how the auto completion provide list of all items
https://github.com/reqnroll/Reqnroll.Rider/blob/main/src/dotnet/ReSharperPlugin.ReqnrollRiderPlugin/CompletionProviders/GherkinStepCompletionProvider.cs#L42-L56

@dominik-niebuhr
Copy link

If you can point to similar implementation (maybe in Visual Studio plugin?) then I'll try getting my hands dirty. Never worked on IDE plugin, though, so no promises.

have you got it working already?

@dominik-niebuhr
Copy link

I've tried my best at #19

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

5 participants