Angular Cypress - Intellisense in Visual Studio

Viewed 32

Having followed the basic install steps for Cypress into my Angular project I cannot get intellisense for the Cypress commands. When I hover over the 'cy' constant that represents Cypress (e.g. cy.visit()), I get the tooltip message:-

Global variables 'cy' added by Cypress with all API commands

Cannot resolve symbol 'cy

I have added a tsconfig.json file into the cypress folder, as advised by the Cypress documents when using Typescript, containing the following:-

{
    "compilerOptions": {
        "target": "es5",
        "lib": [ "es5", "dom" ],
        "types": [ "cypress", "node" ]
    },
    "include": ["**/*.ts"]
}

I am using Visual Studio 2022 but the only advice I can find via the internet is always for Visual Studio Code. I would be grateful for any suggestions

0 Answers
Related