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

Code navigation fails with int wrapped with generic parameter #24

Closed
LouisSimon73 opened this issue Mar 1, 2021 · 7 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@LouisSimon73
Copy link

Hello team,

New code navigation in Rider is supper nice !
We have a small bug here.

If I define:
[When("I have this integer (\d+)")]

Then use it like that in a scenario outline:
When I have this integer
| myInteger |
| 10 |

=> The step cannot be found and I have an error.

Thank you for your work !

@nemesv nemesv added the bug Something isn't working label Mar 1, 2021
@Socolin
Copy link
Collaborator

Socolin commented Mar 1, 2021

In this case, we try to match <integer> with \d+ that is not working.

I'm not sure about the solution, should we try to replace <> with like the first example in Examples to check this properly ?

@LouisSimon73
Copy link
Author

LouisSimon73 commented Mar 1, 2021

Yes, I am sorry, this is a scenario outline so it should be like that :
(I forgot to escape characters...)

[When("I have this integer (\d+)")]

Scenario outline:
When I have this integer <myInteger>

Examples:
| myInteger |
| 10 |

@nemesv
Copy link
Contributor

nemesv commented Mar 1, 2021

@Socolin using the first example would be the best solution, this is how the SpecFlow VisualStudio extension is working.

So when building the SpecflowStepsUsagesCache we should replace the outline parameters e.g. <myInteger> (using the first example e.g. 10) in the stepText before creating the SpecflowStepUsageCacheEntry

@LouisSimon73
Copy link
Author

LouisSimon73 commented Mar 1, 2021

I do not follow you but I have to say that the test is working fine and that it was working for a long time already.
This is just a problem of static analysis. Runtime is fine.

@nemesv
Copy link
Contributor

nemesv commented Mar 1, 2021

@LouisSimon73 yes this issue is only in the Rider analysis part, it has no effect on discovering or running the tests.

@LouisSimon73
Copy link
Author

I also did not mention that is is working fine with (.*) for some other tests that do not require the integer/string distinction

@Socolin Socolin self-assigned this Mar 2, 2021
@Socolin
Copy link
Collaborator

Socolin commented Mar 2, 2021

This should be fixed in master
@LouisSimon73 if you want to test this without waiting we release a new version, you can the latest build here https://github.com/SpecFlowOSS/SpecFlow.Rider/actions

@Socolin Socolin closed this as completed Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants