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

Context menu options throw error in Project which has Step Bindings but no Feature Files #47

Open
jimcomiskey opened this issue Nov 20, 2024 · 1 comment

Comments

@jimcomiskey
Copy link

Used Visual Studio

Visual Studio 2022

Are the latest Visual Studio updates installed?

Yes

Content of reqnroll.json (if present)

{
"$schema": "https://schemas.reqnroll.net/reqnroll-config-latest.json",

"bindingAssemblies": [
{
"assembly": "Steps"
}
]
}

Issue Description

In Visual Studio, if I use a context menu to call "Find Step Definition Usages", I get the instances in feature files where that step is used. This works fine if the step definitions are located in the same project as the feature files. But if I move the steps to a separate project and reference them using bindingAssemblies, the context menu will throw an error stating "Unable to find step definition usages: the project is not detected to be a Reqnroll project or it is not initialized yet".

To work around this problem, if I add an empty feature file to the project holding the step assemblies, that passes the condition that checks if the project is a Reqnroll project, and it is able to detect the feature file from the other project that is referencing this step definition.

The problem will also occur if you use any other context menu option like "Rename step" or "Find unused step definitions"

Steps to Reproduce

I was able to reproduce this using the Reqnroll Project template. After creating this project, I add a new project to the solution and move the step definitions class to that project and reference the project using "bindingAssemblies" in reqnroll.json. The test executes fine, but if I try to call "Find step definition usages", it will throw an error.

Link to a project repository that reproduces the issue

No response

@gasparnagy
Copy link
Contributor

See my comment here: #49 (comment)

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