kiwigrid/gherkin-testcafe

Does gherkin-testcafe support the world concept that comes as standard from cucumberjs?

Closed this issue · 1 comments

Hi there,

I checked out the sample project and did one or two tests. I noticed the following

  1. I tried to implement my own world constructor (looks like it doesn't get called)
const {setWorldConstructor} = require('cucumber');

class World {

    constructor() {
        console.log("World constructor called!!!");
    }

    testFunction() {
        console.log("calling this testFunction");
    }

}

setWorldConstructor(World);
  1. Also step definitions don't appear to run within the world context...(step definitions been before hook, steps and after hook implementations)...which is typically how a cucumber type framework works.

Is their intention to support the world object (as this is a class used to store a-lot of utility stuff throughout the runtime of a test scenario). Thoughts?

Hey @bhreinb,

we do not plan to support the cucumber style world concept. With this package, we just glued the cucumber methods to the Testcafé test executor. All concepts like the world class use the Testcafé style. They use something they call context.

I hope, that this is sufficient for your use case since it would be very hard to emulate with this package and is therefore not planned to be implemented.