Adding snapshot support to Cypress via 3rd party module @cypress/snapshot and testing TodoMVC application.
- Adding
.snapshot()
command by requiring 3rd party module cypress/support/commands.js - Capturing and saving snapshots of primitive values cypress/e2e/unit-spec.cy.js
- Testing central data Vuex store using snapshots cypress/e2e/store-spec.cy.js
- Making assertions against a DOM element using
cy.get('todo-list').snapshot()
cypress/e2e/ui-spec.cy.js
- Run application and open Cypress in GUI mode with
npm run dev
- Run application and headless tests with
npm run test:ci