This extension contains Cypress code snippets used by Andrew Smith. Work in Progress.
In order to install an extension you need to launch the Command Palette (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions. There you have either the option to show the already installed snippets or install new ones.
- JavaScript (.js)
- TypeScript (.ts)
- JavaScript React (.jsx)
- TypeScript React (.tsx)
cy.visit('$1');$0
cy.get('$1')${0:;}
cy.get('$1')${0:;}
cy.get('@$1')${0:;}
cy.get('$1').as('$2')${0:;}
find('$1')${0:;}
first()${0:;}
last()${0:;}
eq($1)${0:;}
type('$1')${0:;}
contains(${2:'$3', }'$1')${0:;}
click()${0:;}
cy.server();$0
cy.route(${2:'$3', }$1).as('${4}');$0
cy.wait(${1:'@${2}'});$0
cy.viewport($1, $2);$0
cy.request({
method: '$1',
url: '$2',
headers: { 'Accept-Language': 'en-us', },
});$0
Cypress.Commands.add('$1', ${3: { previous: '$4' \} , }$2);$0