Code Monkey home page Code Monkey logo

Comments (11)

attila avatar attila commented on May 28, 2024

I noticed that does not work either. Tried with relative paths and realpaths using path.resolve() to no avail.

ERROR: ENOENT: no such file or directory, realpath '/home/attila/example/app/test/features/step_definitions/**/*.js'

My guess is that the pattern is not matched properly. One workaround is to omit the require in cucumberOpts and stick all step definition files to their default location, i.e features/step_definitions and cucumber will pick them up.

from wdio-cucumber-framework.

twKrash avatar twKrash commented on May 28, 2024

Seems to me that * in path is not working.

from wdio-cucumber-framework.

jsardev avatar jsardev commented on May 28, 2024

Have the same problem here.

from wdio-cucumber-framework.

mike-suggitt avatar mike-suggitt commented on May 28, 2024

+1 this is really irritating

from wdio-cucumber-framework.

mike-suggitt avatar mike-suggitt commented on May 28, 2024

FWIW I've done a workaround for the time being that aggregates files together using an index.steps.js file

var world = require('../support/world');

var steps = [
    require('./action.steps'),
    require('./form.steps'),
    require('./navigation'),
    require('./verify.steps')
];

module.exports = function() {
    this.World = world;

    steps.forEach(function(step) {
        step.call(this);
    }.bind(this));
};

from wdio-cucumber-framework.

webmagit avatar webmagit commented on May 28, 2024

Removing the asterisk worked for me -

require: ['./features/step-definitions/']

from wdio-cucumber-framework.

mike-suggitt avatar mike-suggitt commented on May 28, 2024

@webmagit Really? I (wrongly?) assumed the paths were globbed?

from wdio-cucumber-framework.

christian-bromann avatar christian-bromann commented on May 28, 2024

@mike-suggitt I just propagate the values to Cucumber directly so if Cucumber .. so might be that Cucumber handles it differently

from wdio-cucumber-framework.

christian-bromann avatar christian-bromann commented on May 28, 2024

I (wrongly?) assumed the paths were globbed?

Revisit issue and yes seems like cucumber handles this differently. I don't think it is a good idea to change this behavior as it would require to add another dependency. I added a note to the parameter description.

from wdio-cucumber-framework.

devth avatar devth commented on May 28, 2024

Referencing the directory doesn't work for me. Gives:

ERROR: Cannot find module './src/test/features/step_definitions'

Update: Looks like this is reported in #79

from wdio-cucumber-framework.

shaikht8 avatar shaikht8 commented on May 28, 2024

the asterisk worked for me on Mac system removing asterisk worked on windows system. Not sure why!

from wdio-cucumber-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.