Closed xenera-panrenping closed 6 years ago
We use "wdio-sync@0.7.1" in package.json. It is latest version. Check your other dependencies and find how pulls older version.
Hi, @BorisOsipov Thank you for reply, but the problem missing argument is still exsit, I think...
I don't know where you find this code
var executeHooksWithArgs = function executeHooksWithArgs() { var hooks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var args = arguments[1];
may you show where is the problem in source code here? https://github.com/webdriverio-boneyard/wdio-sync/blob/master/index.js#L93
@pactera-testing-PanRenping Or maybe describe the issue you ran into, causes you to start investigating wdio-sync\cucumber internals
Hi @BorisOsipov, Sorry for my late reply. I did a test on my local.
afterStep: (step, result) => { console.log('Result: ' +result); ... },
I checked the wdio-sync module installed in my local node_modules directory. The context of code is older than you shared https://github.com/webdriverio-boneyard/wdio-sync/blob/master/index.js#L93
I download the package(https://registry.npmjs.org/wdio-sync/-/wdio-sync-0.7.1.tgz) and checked the context of the index.js are still old style...
I don't know which step I did wrong, please help. (My real project dependences "wdio-cucumber-framework": "^2.2.2" in package.json)
The last release contained an update to the wdio-sync package.
The version of 'wdio-sync'' package is old. There are three args, "hook", "step " and "result", when hookRunning.js invokes executeHooksWithArgs in wdio-cucumber-framework.
return _get__('executeHooksWithArgs')(this.config.afterStep, step, result);
//Line 67But in old wdio-sync package:
var executeHooksWithArgs = function executeHooksWithArgs() { var hooks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var args = arguments[1];
... The argument "result" will miss!! Please fix it, thanks.