.feature files do not recognize Step Definitions, but tests run fine #1281
Replies: 1 comment
-
|
This (vscode extensions) doesn't pertain to this project. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am facing an issue with cypress-cucumber-preprocessor.
Even though my tests run successfully, the .feature files are highlighted as if they are not linked to their respective Step Definitions. The error message indicates that the steps are not found, but when executing via cypress run or cypress open, everything works correctly.
Here is my configuration in cypress.config.js:
import { defineConfig } from "cypress";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import createEsbuildPlugin from "@badeball/cypress-cucumber-preprocessor/esbuild";
export default defineConfig({
e2e: {
specPattern: "/*.feature",
stepDefinitions: "cypress/e2e/step-definitions//*.js",
async setupNodeEvents(on, config) {
await addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
);
return config;
},
},
});
I have already tried clearing the Cypress cache, reinstalling dependencies, and verifying file paths, but the issue persists.
Has anyone encountered this before or have any suggestions?

Beta Was this translation helpful? Give feedback.
All reactions