1.0.4 • Published 18 days ago
cypress-cucumber-lang v1.0.4
What is Cypress Cucumber Lang?
A set of pre-defined cucumber steps and network interaction utilities to allow you to quickly write human readable tests for your app.
Feature: Some Feature
Background:
Given the 'https://my-app.com' url is loaded
Scenario: Search for Chuck Norris
When the user clicks the textbox element with text 'Name'
And the user types 'Chuck Norris'
And the user clicks the button element with text 'Search'
Then a '@search' request has been sent with input:
"""
{
"query": "Chuck Norris"
}
""""
Installing
Install Cypress for Mac, Linux, or Windows, then get started.
npm install cypress-cucumber-lang --save-dev
or
yarn add cypress-cucumber-lang --dev
Setup
Call the init()
function inside to e2e.ts
import { init } from "cypress-cucumber-lang";
init();
Modify your existing .cypress-cucumber-preprocessorrc
file in the root folder of your project to include the following:
{
"stepDefinitions": [
...
"node_modules/cypress-cucumber-lang/dist/steps/**/*.{js,ts}"
]
}
License
This project is licensed under the terms of the MIT license.