davidjgoss on api-docs-rework
docs: fix typo in tag expressio… fix return type of step hook fu… Release 8.2.1 and 1 more (compare)
github-actions[bot] on v8.2.1
davidjgoss on v8.2.1
davidjgoss on main
Release 8.2.1 (compare)
davidjgoss on step-hook-type
davidjgoss on main
fix return type of step hook fu… (compare)
Hey @channel, I know running a single cucumber scenario gives you so much trouble in VSCode- you need to tag a scenario specifically and then call that tag explicitly from CLI. Very troublesome, right?
What if, you could just right-click a scenario and execute that? What if you just run a whole feature file just by clicking a button? Sounds good, right.
I have published a beta version of that dream just now. I hope you will play with it and help me enhance it by finding bugs.
Here it is: https://marketplace.visualstudio.com/items?itemName=AbhinabaGhosh.cucumberquick
node index.js
at the end of the script since I am following this, https://www.npmjs.com/package/cucumber-html-reporter. I want to try calling node index.js
from afterall but I don't know how to do that yet
Hello everyone, I hope this is the right place to ask this question. I'm running @wdio/cucumber-framework, but maybe those of you familiar with cucumber-js will be able to see the problem. I've defined and set a custom World constructor, and it is being re-constructed with each scenario as expected, as I can see by a console.log("Constructing world") inside the custom constructor function. However: Each scenario is able to somehow modify the subsequently constructed object rather than having it re-constructed with defaults as specified, and the modifications don't get overwritten for the new scenario. world.js looks like this:
const options = {loginBusinessOptions: {
login: "abc",
password: "xyz"
}};
function CustomWorld() {
console.log("Constructing world");
console.log("options.loginBusinessOptions is " + JSON.stringify(options.loginBusinessOptions));
this.nav = {};
// this.context=options;
this.context=Object.assign(options);
}
export default CustomWorld
Observe output of running a scenario twice, where the first scenario sets "this.context.loginBusinessOptions.login='new login' instead of its original value 'abc' as set in the 'options' object above, showing that the 'options' object has been overwritten by the 1st scenario's setting of this.context.loginBusinessOptions.login.
This happens whether the custom constructor simply sets 'this.context=options' or does an Object.assign to prevent the two objects being treated as the same object.
[0-0] Constructing world
[0-0] options.loginBusinessOptions is {"login":"abc","password":"xyz"}
[0-0] ***this.context.loginBusinessOptions is {"login":"abc","password":"xyz"}
Constructing world
options.loginBusinessOptions is {"login":"new login","password":"xyz"}
***this.context.loginBusinessOptions is {"login":"new login","password":"xyz"}
There is a reproducible example of this here: https://github.com/osmolyar/wdio_cucumber_world_not_reinitialized . or - if this does not happen with cucumber-js, it can be narrowed down to a @wdio/cucumber-framework issue. Thanks in advance for any guidance.
Given I want "browserA" to refresh
Given(/^I want "([^"]*)" to refresh$/), (browserN) => { browserN.refresh() })