A typical project using
react-scriptswith components in the src folder and component tests inside cypress/component folder.
Cypress automatically finds Webpack settings used by react-scripts and inserts the component folder name allowing to transpile the component specs the same way the src code is transpiled.
- Make sure the root project has been built .
# in the root of the project
npm install
npm run build- Run
npm installin this folder to symlink the@cypress/reactdependency.
# in this folder
npm install- Start Cypress
npm run cy:open
# or just run headless tests
npm test