Current Behavior
Hi, thanks for the cool library and taking the initiative to develop it. Out-of-the-box Nx integration with wdio is something I've wished for.
I've set up a test Nx workspace:
Project Name |
Project Path |
Nx Generator |
client |
apps/client |
@nx/react |
client-e2e |
apps/client-e2e |
@rbnx/webdriverio |
When I run:
I get the error:
C:\Workspace\wdiotest\node_modules\.bin\wdio wdio.generated.config.ts
Could not execute "run" due to missing configuration, file
I see that the executed command is passing wdio.generated.config.ts
as if it lived at the workspace root, however the file is generated in the project's root (apps/client-e2e/wdio.generated.config.ts
).
If I change this line in run-wdio.ts
, to use configPath
instead of configFile
from:
let command = `${getPackageManagerCommand().exec} wdio ${configFile}`; // configFile
to:
let command = `${getPackageManagerCommand().exec} wdio ${configPath}`; // configPath
...it fixes this issue.
However, then the import
path pointing to wdio.config
is incorrect. I can modify files/wdio.generated.config.ts__tmpl__
to fix this.
So while I can workaround it, I can't help but to think I must be doing something fundamentally wrong, as I'd imagine such an obvious issue like this likely wouldn't be present.
Would you be able to offer me some guidance here, so that I could execute tests out-of-the-box without having to make the modifications I list above? I've set up a test project to repro for your convenience.
Expected Behaviour
Able to execute tests without modifications/workarounds, as outlined above.
Steps to Reproduce
- Clone repro project: https://github.com/octadecimal/nx-webdriverio-test/
- Install dependencies:
yarn
- Run:
yarn nx e2e client-e2e
Nx Report
Node : 16.16.0
OS : win32-x64
yarn : 1.22.19
nx : 16.7.4
@nx/js : 16.7.4
@nx/jest : 16.7.4
@nx/linter : 16.7.4
@nx/workspace : 16.7.4
@nx/devkit : 16.7.4
@nx/eslint-plugin : 16.7.4
@nx/node : 16.7.4
@nx/react : 16.7.4
@nrwl/tao : 16.7.4
@nx/web : 16.7.4
@nx/webpack : 16.7.4
typescript : 5.1.6
---------------------------------------
Community plugins:
@rbnx/webdriverio : 1.5.0
Failure Logs
PS C:\Workspace\wdiotest> yarn nx e2e client-e2e
yarn run v1.22.19
$ C:\Workspace\wdiotest\node_modules\.bin\nx e2e client-e2e
> nx run client-e2e:e2e
$ C:\Workspace\wdiotest\node_modules\.bin\wdio wdio.generated.config.ts
? Could not execute "run" due to missing configuration, file
Additional Information
No response