mucsi96 / nightwatch-api

[DEPRECATED] Cross-runner API for Nightwatch.js
https://nightwatch-api.netlify.com/
MIT License
84 stars 64 forks source link

VSCode intellisense, code navigation doesn't work #942

Closed tim-yao closed 3 years ago

tim-yao commented 3 years ago

Expected Behavior

In VSCode, code navigation for Nightwatch.js API commands should work. Like use F12 to got the definition.

Current Behavior

For example:

Given(/^I open DuckDuckGo search page$/, async () => {
  await client.url('https://duckduckgo.com/');
});

Works on client, not work on url or any Nightwatch commands.

Possible Solution

Steps to Reproduce (for bugs)

Open a nightwatch-api project in VSCode. Example my test project, which is mostly of copy of nightwatch-api cucumber example: https://github.com/tim-yao/eyes-poc

Context

It is a pain without intellisense work properly, auto complete, code nav is just not working.

Your Environment

marge2312 commented 3 years ago

had the same problem. but found a workaround by installing the extension https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete

tim-yao commented 3 years ago

had the same problem. but found a workaround by installing the extension https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete

I have cucumber autocomplete installed, but it's only for Gherkin scripts, won't do anything for Nightwatch.

spnraju commented 3 years ago

Hi @tim-yao I am afraid this is not something we could help you with. there could be various reasons behind this like your vscode extensions and user settings.

tim-yao commented 3 years ago

Hi @spnraju what you may can help is tell me it does work for you so we can continue check my settings. I have other projects works fine like Cypress, I don't need any settings. I also have confirmed with nightwatch.js and they admitted that Nightwatch.js doesn't has the VSCode intellisense support. I ask here is because I see Nightwatch API has some work for that, sounds like should work.