roozenboom / rbnx Goto Github PK
View Code? Open in Web Editor NEWNx plugin for WebdriverIO support
Home Page: https://www.npmjs.com/package/@rbnx/webdriverio
License: MIT License
Nx plugin for WebdriverIO support
Home Page: https://www.npmjs.com/package/@rbnx/webdriverio
License: MIT License
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:
nx e2e client-e2e
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.
Able to execute tests without modifications/workarounds, as outlined above.
yarn
yarn nx e2e client-e2e
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
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
No response
NX Ran target e2e for project sample-project-e2e (21s)
With additional flags:
--spec=src/e2e/jjapp.spec.ts
× 1/1 failed
√ 0/1 succeeded [0 read from cache]
No Spec in the name of "src/e2e/jjapp.spec.ts". But it is generating results as 1/1 failed
Generate e2e test and execute test with "npx nx e2e your-app-name-e2e --spec=src/e2e/app.spec.ts"
1.
Generate e2e test and execute test with "npx nx e2e your-app-name-e2e --spec=src/e2e/app.spec.ts"
No response
No response
As a developer, I would like to be able to run my e2e tests with --watch
, so that I am able to more-rapidly develop my e2e testing Journeys.
Accept a watch
parameter defined in the executor schema that is passed to the executor and runWdio
method, enabling the developer to run wdio in watch mode.
There aren't really any alternative approaches I can see to this that aren't hacky when consuming this package to setup WDIO e2e tests
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.