Setting up Cypress with Cucumber
Let's open the project again and run the following command in the Terminal to install the libraries for BDD:
yarn add -D cypress cypress-cucumber-preprocessor @cypress/webpack-preprocessor @types/cypress-cucumber-preprocessor mochawesome mochawesome-report mochawesome-merge mochawesome-report-generator ts-loader
Here, we have added the Cypress and Cucumber libraries for BDD, as well as the related Mocha awesome library for generating test reports that the Amplify pipeline can pick up.
Before we start integrating Cypress and Cucumber, we should initialize Cypress in our project so that Cypress can generate everything that's necessary for integration:
- Run the following command in the Terminal to initiate Cypress in our project:
yarn run cypress open
- The Cypress binary should launch the very first time and generate the necessary files, as follows:
- Open the
cypress.json
file and...