You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded to version 0.4.0, and put "cypress-cucumber-preprocessor": "^0.4.0" in package.json, and then did "npm install".
However I'm still seeing a similar issue as below: #30
In my support/step_definitions folder there is implementations.js, helpers.js, and shared.js.
Hello @stevepkuo , thanks for reporting!
But this is a bit weird... I just tried in the current version and it worked..
If you could try with the newest version (0.6.0 ) that would be great, maybe I messed up the versions.
But if the problem still persists - could you make a simple reproduction?
I've tried:
letdataToBeLoaded;letdifferentDataToBeLoaded;given("I require a file",()=>{dataToBeLoaded=require("./requiringFilesData");});given("I require a different file",()=>{differentDataToBeLoaded=require("./requiringDifferentFilesData");});then("I can access theirs data",()=>{expect(dataToBeLoaded.IAmImported).to.equal(true);expect(differentDataToBeLoaded.IAmAlsoImported).to.equal(true);});
and also
constdataToBeLoaded=require("./requiringFilesData");constdifferentDataToBeLoaded=require("./requiringDifferentFilesData");given("I require a file",()=>{});given("I require a different file",()=>{});then("I can access theirs data",()=>{expect(dataToBeLoaded.IAmImported).to.equal(true);expect(differentDataToBeLoaded.IAmAlsoImported).to.equal(true);});
Feature file:
Feature: Requiring FilesScenario: Require Two FilesGiven I require a file
And I require a different file
Then I can access theirs data
the files I require are trivial:
module.exports={IAmAlsoImported: true};
and the second one exports "IAmImported: true" in it
Sorry, it was a mistake on my part. I didn't realize that for my team's project, plugins/index.js was ignoring/overwriting cypress-cucumber-preprocessor's index.js which contains the exact fix I wanted. Once I accounted for that, and used version 0.6.0, the problem went away.
I upgraded to version 0.4.0, and put "cypress-cucumber-preprocessor": "^0.4.0" in package.json, and then did "npm install".
However I'm still seeing a similar issue as below:
#30
In my support/step_definitions folder there is implementations.js, helpers.js, and shared.js.
Inside shared.js
const implementations = require('./implementations');
const helpers = require('./helpers');
Importing implementations.js is fine. But it'll look for helpers.js relative to the integration folder, instead of /support/step_definitions.
The text was updated successfully, but these errors were encountered: