Testing

Linting

Testing React

End to End testing

Cucumber and JavaScript

  1. Download and install any necessary browser components: https://www.npmjs.com/package/selenium-webdriver * On macOS you may have to override the quarantine:
  2. Install Selenium: npm install --save-dev selenium-webdriver
  3. Install Cucumber: npm install --save-dev cucumber
  4. Create a features directory
  5. Create a features/support directory.
  6. Create a file (e.g., authors.feature) and add a Scenario

    Feature: Authors
       
      Scenario: Visit the root page
        When I visit the home page
        Then I should see the loading message
        When I wait for the authors to load
        Then I should see a list of authors
    
  7. Create a file features/support/steps.js
  8. Launch your React and API servers
    • This could also be automated; but, I’m trying to keep the example simple.
  9. Run npx cucumber-js

Cypress