I have successfully implemented custom commands in Cypress and I am using Visual Studio Code as my editor. To enable IntelliSense to recognize these custom commands, I referred to this link.
In order to achieve this, I created a cypress/index.d.ts file:
/// <reference types="cypress" />
declare namespace Cypress {
interface Chainable<Subject> {
/**
* Do something
* @example
* cy.doSomething()
*/
doSomething(): Chainable<any>
}}
After adding the index.d.ts file, now when clicking on doSomething in the spec file, it directs me to the declaration in index.d.ts. However, I am wondering if there is a way for Visual Studio Code to open the actual command implementation located under support/commands.js?