cypress-cucumber-steps
Cypress Cucumber step definitions. See docs and examples.
Prerequisites
Install peerDependencies:
npm install --save-dev cypress @badeball/cypress-cucumber-preprocessor
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');
The step definition can now 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