DavidSchuldenfrei / gtest-adapter

Other
18 stars 9 forks source link

Running an individual test is unintuitive #17

Closed ftrofin closed 6 years ago

ftrofin commented 6 years ago

First of all, thanks for providing this extension, I love it and it's very useful for us. I noticed a small UI issue which makes it for an unintuitive (poor) user experience: Suppose you have a selection in the list of tests: image I left clicked on "TestCreateRegistryKey" and the entry is selected. Now I right click on another test in that list and choose Run: image Notice how "TestCreateSubkey" also shows selected in addition to "TestCreateRegistryKey". When I release the mouse button (after clicking on Run), TestCreateSubkey is deselected and TestCreateRegistryKey remains selected and VS Code runs TestCreateRegistryKey instead!

So two issues here:

If multi-selection would have been allowed, this would have made more sense. But since only one selection can be made I suggest that right-clicking an entry in the list also changes the selection before popping up that context menu, so when Run is chosen, the correct test is executed.

Environment: MacOS 10.13.6 VS Code Version 1.28.1 (1.28.1) GoogleTest Adapter version 1.2.4 Latest gtest version (1.8.1)

DavidSchuldenfrei commented 6 years ago

@ftrofin I am glad that you like this extension, and I appreciate your feedback. I agree that this is counter-ituitive, and I have myself mistakenly run the wrong test. I believe that this is a limitation of VsCode API. I asked on StackOverflow, if there is a way to get this to work.

DavidSchuldenfrei commented 6 years ago

Solved in release 1.3.0 @ftrofin If you have any further suggestions to make this extension more useful, please feel free to add further issues. All feedbacks (and 5 star ratings) are welcome.

ftrofin commented 6 years ago

Works perfectly now! Thanks a lot, this is so much better!