@wdio/cucumber-framework: Add original coordinates when resetting Cucumber Support Library#11078
Conversation
|
@tamil777selvan Mind having a look at this? |
hi @nextlevelbeard, Given that this is an options parameter, it shouldn't cause an error. Also, in your I've tested it with the provided custom world, and it worked as expected for me. Could you provide any reproducible examples or scenarios where this issue occurs? |
Yep, pure ESM and To reproduce try to put I know we are not supposed to use that feature with WDIO but that's how I found the error. Another problem I found with the support code library in parallel, when importing the globals from Error: No browser instance registered. Don't import @wdio/globals outside of the WDIO testrunner context. Or you have two two different "@wdio/globals" packages installed.
at Object.get (file:///Users/user/repos/repo/node_modules/@wdio/globals/build/index.js:15:23)
at Scenario.doStuff (file:///Users/user/repos/repo/e2e/steps/hooks.steps.ts:49:36)Issue updated. |
|
Seems like each WDIO worker should correspond to one Cucumber worker when At the moment, |
In this situation, we shouldn't permit the use of parallel counting to be specified in the
I'm uncertain if we can immediately implement this change because the current functionality is aligned with the worker nodes that were generated by the 'runner' process and is functioning as intended. |
Then it would be a better approach not to relay on the |
|
It seems to me that WebdriverIO currently doesn't support Cucumber's parallel feature. I raised a PR (#11099) to ensure we fail if the I suggest to close this PR and raise a new issue to discuss support for Cucumber parallel feature. What do you all think? |
|
@christian-bromann Agree, I could raise a new issue. |
|
Created #11101 |
Proposed changes
Adds original coordinates
when resetting the Cucumber Support Library.
In some cases, when a user defines a custom World like so:
Cucumber follows different logic for dealing with the support library, as seen here:
This only appears to be a problem when the
paralleloption is set to a non-zero value.This fix includes the third argument for the original coordinates in the
reset()call of theSuportCodeLibraryBuilder.Prevents errors such as
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers