90poe / vscode-cy-helper

VS Code IDE Extension for Cypress.io
https://marketplace.visualstudio.com/items?itemName=Shelex.vscode-cy-helper
Apache License 2.0
18 stars 8 forks source link

Go to custom command definition / Custom command not found #24

Closed thaianalps closed 4 years ago

thaianalps commented 4 years ago

Bug or problem When I use "Cypress: Go to custom command definition" this message is displayed: "Custom command not found"

My .vscode/setting.js

{
    "cypressHelper.includeAnnotationForCommands": true,
    "cypressHelper.customCommandsFolder": "cypress/support",
    "cypressHelper.typeDefinitionFile": "cypress/support/customCommands.d.ts",
    "cypressHelper.fixtureAutocompletionCommands": [
        "fixture"
    ],
    "cypressHelper.menuItems": {
        "OpenSingleTest": true,
        "OpenSpecFile": true,
        "GenerateCustomCommandTypes": true,
        "GoToCustomCommand": true,
        "FindCustomCommandReferences": true,
        "FindStepDefinitionReferences": true
    },
}

Expected behavior I expected it to be forwarded to the custom command.

Environment ():

Prints:

screenshot_2 screenshot screenshot_1

Shelex commented 4 years ago

Hello @thaianalps Thank you for posting an issue with so well documented info!

It was not reproducing on OSX or Windows so I have checked VirtualBox with Linux Mint installation - and actually got it. That is because of sanitising absolute paths by removing trailing slashes. It seems that on linux distros the first slash is needed for accessing files, so I have provided a fix in version 0.6.2.

Could you please update and check if it works for you?

thaianalps commented 4 years ago

Worked perfectly!!!!

Thanks a lot!