Reputation: 1142
I was doing some re org, and moved around the files where cucumber tests, step definitions, and page objects were located. The tests were running fine before, but now whenever I try to run them I instantly get an undefined steps error. Is there a particular file somewhere that I can update that will allow the step definitions to be found?
Just a little more info - The folder structure is set up like
[]tests
[]features
[]step_definitions
[]page_objects
Is it because step_definitions and features are in their own directory?
Upvotes: 0
Views: 1653
Reputation: 1142
Figured it out, hopefully this solution will work for anyone else with a similar issue. There is a file, cucumber.conf.js, that contains the info where the step dfinitions are
cucumberOpts: {
format: formatter.getFormatters(),
require: ['test/e2e/features/**/step_definitions/*.js'],
strict: true
}
In that require: section you can also place multiple locations if you have multiple dependancies.
Upvotes: 0