SpecFlowOSS / SpecFlow.VS

The next version of the Visual Studio extension for SpecFlow
MIT License
36 stars 10 forks source link

'Go to Test' from Test Explorer window opens the auto-generated C# backing file instead of the .feature file #119

Closed mattrenshaw94 closed 1 year ago

mattrenshaw94 commented 1 year ago

Used Visual Studio

Visual Studio 2022

Are the latest Visual Studio updates installed?

Yes

SpecFlow Section in app.config or content of specflow.json

No response

Issue Description

When navigating to a test by double clicking it in the test explorer, the C# backing file for the test is being opened instead of the feature file. This only started occurring when updating to the latest preview version of Visual Studio 2022 (Version 17.5.0 Preview 2.0).

Steps to Reproduce

Visual Studio version: 2022 Version 17.5.0 Preview 2.0 Specflow version: 3.9.74 .NET version: 6.0 Specflow extension version: 2022.1.89.53862

This is recreate-able by:

  1. Create a new specflow project in Visual Studio
  2. Ensure the Test Explorer window is open
  3. Build the project to discover all tests
  4. Double click the 'AddTwoNumbers' test that was created as part of the project OR right click the test in the Test Explorer, and select 'Go to Test'

Expected: The Calculator.feature file is opened

Actual: The Calculator.feature.cs file is opened

Link to Repository Project

No response

autosonic commented 1 year ago

This is still a problem in Visual Studio 17.5.1. SpecFlow extension version 2022.1.91.26832.

mattrenshaw94 commented 1 year ago

a duplicate issue was created for this that got more attention (#127), but just in case anyone else is reading this, a fix was released in the form of an update to visual studio - i've downloaded it and confirmed that the issue is resolved.

https://github.com/SpecFlowOSS/SpecFlow.VS/issues/127#issuecomment-1469548415