-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] CLI option to create nested e2e project #743
Comments
I agree with this. I use NX extensively across multiple projects and each time I create a new app, I restructure it so that the e2e code lives inside of the app folder as opposed to along side of it. I'd love a CLI option built in to handle this. 👍 |
Totally agree ! |
So I've been spending some time trying to implement this feature but I've hit a wall. Even moving files and folders manually, I'm not able to successfully run Here's what I'm doing.
I feel like I've accounted for all the necessary file path changes.
@dallastjames I might be missing something here, I'd be interested to know how you restructure your apps. |
I was able to workaround the problem I was having.
I'll open a PR for this feature request shortly! |
…generated apps `ng generate application my-app --nestE2e` creates my-app-e2e project in apps/my-app/e2e see nrwl#743
Hi @chriswnewman!
|
For anyone still interested, this will be the default behavior in Angular CLI 8.0 angular/angular-cli#12326 |
Nx still creates separate project for e2e tests. It this ever going to be an option? It is possible to restructure project manually and adjust workspace.json to point to updated file locations but we still have two projects in workspace. In my opinion, apps folder should contain applications. E2E testing is part of the application, not another application. So when i want to run e2e tests, it's common sense to type nx e2e myapp (not nx e2e myapp-e2e), and expect it to run tests inside that application. Correct me if I am wrong, but i don't see any reason for e2e test suit to be an application in workspace. It's cluttering my dependency graph also. Why whould i need it on dependency graph, its just a dev tool.. |
Can someone explain the reasoning behind this decision for us non-Angular folks? E.g. I have a storybook in a lib project, but I also want my e2e Cypress test for the storybook in the same lib project. Why would the e2e tests for a lib project have its own app? |
I would also be very interested in this feature, as well. It seems like Angular 8+ intended to nest e2e projects by default: angular/angular-cli#12326 - however, I just installed There are so many people wanting to nest e2e INTO the project folder it belongs to, is there a specific reason why not to have a CLI argument for this? I found it really counter-productive to manually refactor each time :( Thanks! |
Since this is still not supported, I found a way to make better folder structure that requires minimal config update. I just generate an app in folder with |
Is there any update on this topic? I think it is a good idea to have nx as close to ng as possible and therefor it could be a good idea to provide the nested e2e option. |
I dont think they will look at closed issues, so going to create a new one. A lot has changed since this got closed. #4812 |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
I recently started trying to adopt nx and monorepo-style development. One thing that strikes me as being different for no apparent reason, is that e2e projects for newly generated apps are moved outside of the main app folder.
Nx Workspace
Standalone Angular app
I can appreciate the reasoning for moving the node_modules and dist folders above the level of individual project. But I can't say the same for e2e.
Without knowing the reasoning behind this design decision, my opinion is that it would be nice to have a CLI option to preserve the nested e2e folder style of traditionally generated Angular apps. The default for this option could even be the current behavior.
There is an unanswered question on SO related to this.
https://stackoverflow.com/questions/51763075/why-does-nrwl-nx-create-a-separate-e2e-project-for-each-app
The text was updated successfully, but these errors were encountered: