Skip to content

Allow generation of apps with nested e2e projects instead of sibling e2e projects. #12326

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

Closed
chriswnewman opened this issue Sep 20, 2018 · 3 comments · Fixed by #13780
Closed
Labels
area: @schematics/angular feature Issue that requests a new feature
Milestone

Comments

@chriswnewman
Copy link

Bug Report or Feature Request (mark with an x)

This is a feature request

Desired functionality

When generating a new app inside of a workspace, I would like to be able to nest the respective e2e project inside the new app.

Current structure: sibling e2e (ng generate application app2)

...
projects
    -app2
        -src
    -app2-e2e

Desired structure: nested e2e

...
projects
    -app2
        -src
        -e2e

Mention any other details that might be useful

Initially raised this as a feature request / PR in Nrwl's NX repo here: nrwl/nx#743
But it was determined that this is the appropriate place to raise this feature request.

Related question on SO here: https://stackoverflow.com/questions/51763075/why-does-nrwl-nx-create-a-separate-e2e-project-for-each-app/

Proposal

Add a new option to the ng generate application schematic named nestE2e (although naming things isn't exactly my specialty), which can be used to create a nested e2e project (as opposed to a sibling e2e project) for the newly generated app.

ng generate application my-app --nestE2e

Consideration

This would be helpful for working in a monorepo, or for working in an empty workspace (#12216). As more apps get generated, you wouldn't be left with 2x the number of folders cluttering (imo) the projects directory.

The desired structure above is also more familiar to people who work on standalone apps generated with ng new, in that e2e code is kept within the app directory.

@chriswnewman chriswnewman changed the title Allow generation of nested e2e projects instead of sibling e2e projects. Allow generation of apps with nested e2e projects instead of sibling e2e projects. Sep 20, 2018
@alan-agius4 alan-agius4 added feature Issue that requests a new feature area: @schematics/angular labels Sep 21, 2018
@ngbot ngbot bot added this to the Backlog milestone Sep 21, 2018
@clydin
Copy link
Member

clydin commented Mar 1, 2019

This will be the default behavior in 8.0.

@jordandlaman
Copy link

jordandlaman commented Jul 2, 2019

This isn't the default behavior for creating an app with cypress though is it? Just upgraded to nx8 and it still creates cypress e2e folders alongside the app folder. Not sure this is entirely "closed" @hansl

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @schematics/angular feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants