Cypress.io notes

simple cypress test
Getting dom element and use chai assertion

Use hookbeforeEach(() => {}) to remove repeated code.

Example of dealing with flaky tests
Create using cypress.json (env block can be moved to separate file cypress.env.json)

Cypress uses the sinon.js library to create test doubles.

using stubs
using spy’s
Other useful commands

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store