JSPM

  • Created
  • Published
  • Downloads 1080
  • Score
    100M100P100Q124722F
  • License MIT

Cypress Cucumber step definitions

Package Exports

  • cypress-cucumber-steps
  • cypress-cucumber-steps/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cypress-cucumber-steps) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cypress-cucumber-steps

NPM

NPM version build cypress

Cypress Cucumber step definitions. See docs and examples.

Prerequisites

Install peerDependencies:

npm install --save-dev cypress @badeball/cypress-cucumber-preprocessor

Or using Yarn:

yarn add --dev cypress @badeball/cypress-cucumber-preprocessor

Then set up Cypress and cypress-cucumber-preprocessor.

Installation

NPM:

npm install --save-dev cypress-cucumber-steps

Yarn:

yarn add --dev cypress-cucumber-steps

Usage

Create a directory for the common step definitions:

mkdir -p cypress/support/step_definitions/

Create a step definition file:

touch cypress/support/step_definitions/**/*.{js,ts}

Replace **/*.{js,ts} with a filename like index.ts.

Require the module with TypeScript:

import 'cypress-cucumber-steps';

Or require the module with CommonJS:

require('cypress-cucumber-steps');

Now the step definition can be used in feature files:

# cypress/e2e/example.feature
When I visit "https://example.com/"
Then I see text "Example Domain"

See docs and examples.

Release

Release is automated with Release Please.

License

MIT