This repo presents both Cucumber
and Cypress
s tests for validating links and page loads in Chrome and Firefox on docker.
Note: The non-cucumber cypress test variant utilises the cypress-each
package and a custom pre-process step that generates a typed, static list of pagesToScrape to create separate it()
statements for each link found on each page. This helps quantify results by increasing test count from 3 to 147.
Runs the Cucumber and Cypress tests in Chrome and Firefox with Cypress 10.3.0
:
npm run docker
Tests the node pre-process function util/getApiLinks, and validates the results according to typescript type.
npm run jest:test
npm run cypress:open
- Dockerized - Runs both Firefox and Chrome
- Typescript
- Cypress, Cucumber Tests:
- There are no console errors on page loads (chrome minimum)
- The response code from the page (200, 302, 404, etc.)
- All links on the page go to another live (non 4xx) page
- Cypress Docker builds not working on Macbook Air M1
- Approach used to
spy
on console errors only works for errors that occur after the page loadevent
. This means script errors before that go undetected when using validateNoConsoleErrors. See spy-console.spec for investigation.