[Cypress Documentation] (https://www.cypress.io/)
npm install cypress
Open the terminal:
-
Start the local dev server using:
npm run dev --es5
-
In a separate terminal window run:
npm run cypress
- this will open the test runner which will allow you to either run all of the tests, or select individual test files.
All Cypress E2E testing files live within the cypress/integration folder.
Add .only before the describe suites or it blocks in the cypress/integration/.spec files, such as:
describe.only('Contact Form')
, or
it.only('Should...)
Add cy.screenshot('nameOfYourChoosing')
inside of any 'it' block.
The image will then appear as a file within the cypress/screenshots directory after you run the tests.