cucumber-js-tsflow icon indicating copy to clipboard operation
cucumber-js-tsflow copied to clipboard

Access to this.attach() from typescript class with @binding()

Open senthil-kr opened this issue 4 years ago • 1 comments

Hi, I'm looking into using the framework to implement the cucumber tests in our project. Trying to use attach() to add logs in the reports is something I'm trying to workout how to do it when I implement the tests in typescript. Is this something that's supported when implementing the tests in typescript. If not, it would be great to add.

senthil-kr avatar Aug 11 '20 14:08 senthil-kr

cucumber-tsflow tries to better encapsulate the concept of 'world' in Cucumber.js, and present things in a more object oriented way. In this case, the class itself is meant to represent the world for a running scenario. I'm going to try and open this up more in the next version.

In the meantime, some folks have discovered that you can access the world object using this._worldObj in your step definitions. Please see https://github.com/timjroberts/cucumber-js-tsflow/issues/40 for more context. Hope this helps in the meantime.

timjroberts avatar Nov 08 '20 14:11 timjroberts