- set up React component testing
- write simple tests
- run tests on CI
📝 How Cypress Component Testing Was Born
+++
- clone repo https://github.com/bahmutov/the-fuzzy-line
- check out the branch "workshop"
$ npx degit bahmutov/the-fuzzy-line#workshop
$ cd the-fuzzy-line
$ npm install
+++
+++
There are several component testing placeholders in src
folder
- ⌨️
src/components/Numbers.cy.js
- ⌨️
src/components/Difficulty.cy.js
- ⌨️
src/components/Overlay.cy.js
Tip: read https://on.cypress.io/component-testing
- Mount the component and use it as E2E web app
- https://slides.com/bahmutov/the-fuzzy-line
- https://slides.com/bahmutov/test-components-without-fear
- https://cypress.tips/courses
➡️ Pick the next section or jump to the end chapter