Code for blog post Element coverage
- overwrite several built-in Cypress commands in cypress/support/commands.js to keep track of elements the test interacts with
- draw elements after the tests finish
To make sure the server starts and builds the app before the tests start on CI, wait-on utility is used to check on local port 3000 before running Cypress tests. See the NPM scripts in the package.json file.