Integrating Cucumber and Puppeteer into your code base
Let’s add the necessary packages to our project:
- Start by installing the packages we’re after. As well as Cucumber and Puppeteer, we’ll also pull in
@babel/register
, which will enable us to use ES6 features within our support files:$ npm install --save-dev @cucumber/cucumber puppeteer $ npm install --save-dev @babel/register
- Next, create a new file named
cucumber.json
with the following content. This has two settings;publishQuiet
turns off a bunch of noise that would otherwise appear when you run tests, andrequireModule
hooks up@babel/register
before tests are run:{ "default": { "publishQuiet": true, "requireModule": [ "@babel/register" ] } }
- Create a new folder called
features
. This should live at the same level assrc...