I just want to ask for help because I can't run my feature file since the step definitions cannot be found
Folder pattern enter image description here
package.json
{
"name": "sample project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"cypress": "^13.6.2"
},
"devDependencies": {
"cypress-cucumber-preprocessor": "^4.3.1"
},
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true,
"step_definitions": "cypress/e2e/cucumber/stepDefinitions/*"
} }
cypress.config.js
const cucumber = require('cypress-cucumber-preprocessor').default
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
on('file:preprocessor',cucumber())
},
specPattern: "cypress/e2e/cucumber/feature/*.feature",
},
});
I'm trying to run my feature file, and getting an error
You should change this dependency
to this one
The one you are using is no longer maintained, but the package has been taken over and re-branded with
@badeballto allow you to pick the update a little easier.The instructions for installing are given here quick start