Run cucumber/gherkin-syntaxed specs with Cypress

Overview

cypress-cucumber-preprocessor

This preprocessor aims to provide a developer experience and behavior similar to that of Cucumber, to Cypress.

Installation

See badeball/cypress-cucumber-preprocessor for a public, community-maintained edition and installation instructions.

Introduction

The preprocessor (with its dependencies) parses Gherkin documents and allows you to write tests as shown below.

# cypress/integration/duckduckgo.feature
Feature: duckduckgo.com
  Scenario: visting the frontpage
    When I visit duckduckgo.com
    Then I should see a search bar
// cypress/integration/duckduckgo.ts
import { When, Then } from "@klaveness/cypress-cucumber-preprocessor";

When("I visit duckduckgo.com", () => {
  cy.visit("https://www.duckduckgo.com");
});

Then("I should see a search bar", () => {
  cy.get("input").should(
    "have.attr",
    "placeholder",
    "Search the web without being tracked"
  );
});

User guide

For further documentation see docs and docs/quick-start.md.

Contributing

See badeball/cypress-cucumber-preprocessor for a public, community-maintained edition and contribution instructions.

Building

Building can be done once using:

$ npm run build

Or upon file changes with:

$ npm run watch

There are multiple types of tests, all ran using npm scripts:

$ npm run test:fmt
$ npm run test:types
$ npm run test:unit
$ npm run test:integration # make sure to build first
$ npm run test # runs all of the above
You might also like...

Export Cypress Tests from Google Chrome DevTools' Recorder

@cypress/chrome-recorder This repo provides tools to export Cypress Tests from Google Chrome DevTools' Recordings Installation $ npm install -g @cypre

Dec 20, 2022

A simple application to estuding tests end-to-end in Angular with Cypress

Conhecimento sobre testes End to End (ponta a ponta) Sobre o Cypress: Testes feitos do sistema para ver como um usuário se comportaria, esses testes é

Jun 15, 2022

Enable hover capabilities for Cypress. 🛸

cypress-hover 🛸 Enable hover capabilities for Cypress 🛸 with zero dependencies! 💯 Installation npm install cypress-hover Usage In your cypress/sup

Sep 1, 2022

Easy conditional if-else logic for your Cypress testsDo not use

Easy conditional if-else logic for your Cypress testsDo not use

cypress-if Easy conditional if-else logic for your Cypress tests Tested with cy.get, cy.contains, cy.find, .then, .within commands in Cypress v9 and v

Dec 14, 2022

A template for your Next.js projects including Typescript, Eslint, Prettier, Jest, Cypress and Docker.

A template for your Next.js projects including Typescript, Eslint, Prettier, Jest, Cypress and Docker.

Next.js Template Quickly start a new Next.js project A template for your Next.js projects including Typescript, Eslint, Prettier, Jest, Cypress and Do

Oct 7, 2022

An adapter where you can define which function to run

Switch Functions An adapter where you can define which function to run Installation This is a Node.js module available through the npm registry. Befor

Jun 17, 2022

This repository contains a basic example on how to set up and run test automation jobs with CircleCI and report results to Testmo.

CircleCI test automation example This repository contains a basic example on how to set up and run test automation jobs with CircleCI and report resul

Dec 23, 2021

Run async code one after another by scheduling promises.

promise-scheduler Run async code in a synchronous order by scheduling promises, with the possibility to cancel pending or active tasks. Optimized for

Dec 17, 2021

🚀 A web extension starter built with React, Typescript, and Tailwind CSS. Build once, and run on multiple browsers: Google Chrome, Mozilla Firefox, Microsoft Edge, Brave, and Opera..

🚀 A web extension starter built with React, Typescript, and Tailwind CSS. Build once, and run on multiple browsers: Google Chrome, Mozilla Firefox, Microsoft Edge, Brave, and Opera..

Web Extension Starter A web extension starter, built with React, Typescript, and Tailwind CSS. Build once, and run on multiple browsers: Google Chrome

Dec 28, 2022
Owner
Klaveness Digital A/S
Klaveness Digital A/S
Cypress Boilerplate with Cucumber (BDD)

Cypress Boilerplate with POM and Cucumber Download & Configuration npm init --> package.json npm install cypress cypress-cucumber-preprocessor --> pac

Sefa Batuhan Bayazitoğlu 7 Nov 4, 2022
Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command

cypress-thenify Rationale Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command. Howev

Mikhail Bolotov 15 Oct 2, 2022
Jest + Cucumber = <3

Cool Cucumber Run Cucumber tests from feature files with Jest. Idea You want to write wonderful feature files (in Gherkin), but instead of using Cucum

The Techno Creatives 5 May 12, 2022
Run a command, watch the filesystem, stop the process on file change and then run the command again...

hubmon Run a command, watch the filesystem, stop the process on file change and then run the command again... Install You can install this command lin

Hubert SABLONNIÈRE 7 Jul 30, 2022
🚀Starter project with Angular 13, Ngx-admin, NestJS, Nx Workspace, Jest, Cypress, ESLint & Prettier 🚀

Angular 13 + Ngx-admin + NestJs + NX Starter project with Angular 13, Ngx-admin, NestJs, Nx Workspace, Jest, Cypress, ESLint & Prettier Features ✅ Ang

Wilfried 49 Jan 4, 2023
Projeto de exemplo para realização de testes de integração (API) utilizando o Cypress

Projeto de exemplo para realização de testes de integração (API) utilizando o Cypress

Robson Agapito Correa 14 Nov 28, 2022
Access the internals of React components from Cypress end-to-end tests

cypress-react-app-actions Access the internals of React components from Cypress end-to-end tests Read Access React Components From Cypress E2E Tests a

Gleb Bahmutov 5 May 12, 2022
A cypress plugin for projects using @azure/msal-browser

A cypress plugin for projects using @azure/msal-browser

Intility 15 Aug 11, 2022
A repository of a Cypress testing demo

adeoweb-cypress-demo This is a repository of a Cypress testing demo. Based on adeoweb.biz website case study. What is this talk We will ?? live-code a

Eimantas 3 Mar 24, 2022